02
Feb
2011
LiveValidation with rails i18n
LiveValidation is a great tool to validate your form, syntax clear, easy and powerfull.
If you want to use your already translated i18n messages, you could use something like that :
var myfield = new LiveValidation( ‘theformfieldid’, {onlyOnSubmit: true } );
myfield.add( Validate.Presence, { failureMessage: “#{t(:”activerecord.errors.messages.empty")}", validMessage: ""} );
with any of the activerecord translated errors messages.
Add comment