What would you like to be added:
Input customization when validation fail.
Why is this needed:
Cause this give us possibility of adding a custom style to the input when it is not valid.
For example: Change input border-color to RED
Hey, could I take this one or are your working on that? :smile:
I think this is a good idea. When I was creating the web app for the "unform challenge", I needed to style the error message with a red color. If we could pass something like a styleError object as a prop would be great.
I think is a basic feature to handle and customize erros. I'm creating a app right now and I don't know how to handle this one.
@gabrielbuzziv thanks for the suggestion!
I think that adding a has-error class on the field solves this, what do you think about it? This class would be added automatically by unform when there's an error on the field, then you can style it however you want to.
Could you send us a PR?
Now you can create your own custom input and change input classes or styled when error is present. Check the Simple input guide.
Most helpful comment
I think this is a good idea. When I was creating the web app for the "unform challenge", I needed to style the error message with a red color. If we could pass something like a
styleErrorobject as a prop would be great.