hashbangperl / HTML--FormHandlerX--Form--JQueryValidator

HTML::FormHandlerX::Form::JQueryValidator
1 stars 0 forks source link

Use $field->required_message and localize required message #1

Closed dpetrov closed 12 years ago

dpetrov commented 12 years ago

It would be nice if the role could localize the required message and to take in mind the $field->required_message attribute.

I am not quite sure, but something like $self->_localize($self->required_message) probably should work

dpetrov commented 12 years ago

The correct would be: $self->_localize($field->get_message('required'), $field->loc_label);

hashbangperl commented 12 years ago

Done, added unit test to confirm :)

dpetrov commented 12 years ago

Thanks