bgould / jmesa

Automatically exported from code.google.com/p/jmesa
0 stars 0 forks source link

Value of custom validation is not being used consistently in validation framework #267

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
addCustomWorksheetValidation(new WorksheetValidation("myCustomValidation", 
"validateLastName").setErrorMessage("foo is not valid"));

produces the following javascript which is wrong and gives javascript error.
jQuery.validator.addMethod('myCustomValidation', myCustomValidation);

The correct javascript should be
jQuery.validator.addMethod('myCustomValidation', validateLastName);

WORKAROUND:
Keep the name of validation same as its value. e.g.

addCustomWorksheetValidation(new WorksheetValidation("validateLastName", 
"validateLastName").setErrorMessage("foo is not valid"));

Original issue reported on code.google.com by sidda...@gmail.com on 13 Jun 2010 at 6:04

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Fixed in revision 2509.

Original comment by sidda...@gmail.com on 22 Jun 2010 at 6:27