Bug Tracker

Ticket #2908 (closed feature: fixed)

Opened 6 months ago

Last modified 6 months ago

Patch - Validate Plugin - Custom Messages in Metadata

Reported by: DaneOConnor Assigned to: joern
Type: feature Priority: major
Milestone: 1.2.4 Component: plugin
Version: 1.2.3 Keywords: validate
Cc: Needs: Commit

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

JqueryValidate-CustomMetaMessages.patch (78.3 kB) - added by DaneOConnor 6 months ago.
JqueryValidate-CustomMetaMessages-unix.patch (77.1 kB) - added by DaneOConnor 6 months ago.
JqueryValidate-CustomMetaMessages-unix-again.patch (4.9 kB) - added by DaneOConnor 6 months ago.
meta-messages.patch (1.4 kB) - added by scott.gonzalez 6 months ago.
proper patch

Change History

Changed 6 months ago by DaneOConnor

Changed 6 months ago by scott.gonzalez

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 6 months ago by DaneOConnor

Changed 6 months ago by DaneOConnor

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

Changed 6 months 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.

Changed 6 months 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 6 months ago by DaneOConnor

Changed 6 months 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.

Changed 6 months ago by joern

  • owner set to joern

Changed 6 months ago by scott.gonzalez

proper patch

Changed 6 months ago by scott.gonzalez

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.

Changed 6 months ago by joern

  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.