auraphp / Aura.Input

Tools to describe HTML form fields and values.
MIT License
65 stars 11 forks source link

There should be a way to set error messages for the field #23

Closed harikt closed 11 years ago

harikt commented 11 years ago

I was working with a special requirement and I feel there should be a way to set the error messages for the field.

The reason is some validators are validating the model like username already exists in the database, and it will be nice if we can set the error messages to the corresponding field name.

I will work on both the Aura.Input and Aura.Filter to have a method setMessages($field = null) .

What do you think? Go with it ?