Bug Tracker

Opened 12 years ago

Closed 12 years ago

#2908 closed feature (fixed)

Patch - Validate Plugin - Custom Messages in Metadata

Reported by: DaneOConnor Owned by: joern
Priority: major Milestone: 1.2.4
Component: plugin Version: 1.2.3
Keywords: validate Cc:
Blocked by: Blocking:

Description

Attached is a patch for the validate plugin. The patched plugin supports custom messages specified in metadata. It also includes a small example using the new feature in a few different ways.

If there is anything I should change let me know :)

Attachments (4)

JqueryValidate-CustomMetaMessages.patch (78.3 KB) - added by DaneOConnor 12 years ago.
JqueryValidate-CustomMetaMessages-unix.patch (77.1 KB) - added by DaneOConnor 12 years ago.
JqueryValidate-CustomMetaMessages-unix-again.patch (4.9 KB) - added by DaneOConnor 12 years ago.
meta-messages.patch (1.4 KB) - added by scottgonzalez 12 years ago.
proper patch

Download all attachments as: .zip

Change History (12)

Changed 12 years ago by DaneOConnor

comment:1 Changed 12 years ago by scott.gonzal

Dane, can you please re-create the patch with Unix line-endings? The patch currently shows that every line has changed and I can't apply it to my working copy to review the changes. Thanks.

Changed 12 years ago by DaneOConnor

comment:2 Changed 12 years ago by DaneOConnor

Ok, I converted the patch. It should now have Unix line endings, though I'm not totally sure. Does it work?

comment:3 Changed 12 years ago by joern

That patch still tries to replace everything, that isn't helpful. It looks like you need to convert line-endings before creating the patch.

comment:4 Changed 12 years ago by DaneOConnor

Ok, sorry about all that. I've never really had to deal with that issue before. I test applied the patch and it looks like its working. If, this doesn't work I suppose I'll just list my changes manually.

Additionally, the change @ lines 124-131 doesn't really change behavior. It just made it a lot easier for me to debug when I was playing with some ideas.

Changed 12 years ago by DaneOConnor

comment:5 Changed 12 years ago by joern

I've commited test in [5690]. The latest patch works much better, but I still have trouble applying it. I'll commit it once I figured it out.

comment:6 Changed 12 years ago by joern

Owner: set to joern

Changed 12 years ago by scottgonzalez

Attachment: meta-messages.patch added

proper patch

comment:7 Changed 12 years ago by scott.gonzal

I have no idea what's going on with these patches. I manually added the changes from Dane's patch and created a new patch (meta-messages.patch). Even though the patch was made with Unix line endings, Eclipse is still converting the entire file to Windows line-endings when applying the patch.

Right now, you should be able to apply my patch and get the changes. If Eclipse does switch the line endings when you apply, just use File -> Convert Line Delimiters To -> Unix. I'm really not sure what Eclipse's problem is right now. Perhaps we should consider setting eol-style: native for all source files (I've already done this for core and UI).

I didn't actually have time to review the patch, but from a quick look it seems fine.

comment:8 Changed 12 years ago by joern

Resolution: fixed
Status: newclosed

Fixed in [5695], thanks Dane for the patch and Scott for the help.

Note: See TracTickets for help on using tickets.