bouncer icon indicating copy to clipboard operation
bouncer copied to clipboard

Add a ‘success’ or ‘valid’ class to an input once it has validated

Open matthewmcvickar opened this issue 5 years ago • 5 comments

There is an error class, but no corresponding success class. This would be very useful for styling fields that have been correctly filled out.

matthewmcvickar avatar Jan 29 '19 05:01 matthewmcvickar

Is this in development? Any indication when this might get released?

robinvoor avatar Aug 19 '19 11:08 robinvoor

@cferdinandi It would be great. You already add aria-invalid="true", so aria-invalid="false" after removing error would be great or a class is-valid.

awgul avatar Sep 21 '19 17:09 awgul

Hello, I just saw this and other request for enhancements, I think I can easily implement 2 or 3 enhancements as I already did for @cferdinandi validate.js (in my private repository, add .valid class, prevent default submit to submit from ajax etc.), the thing is, I see multiple stall pull requests, are there any guidelines for contribution @cferdinandi ? thanks in advance for your response, and thanks for creating this amazing library.

alanalvarado avatar Dec 30 '19 19:12 alanalvarado

You could always use the pseudo-class :valid for styling a valid input, however a valid or success class would be sweet.

https://alligator.io/css/styling-form-input-validity/

nathanaskinner avatar Jan 29 '20 13:01 nathanaskinner

Came here to find out about this - did anyone end up implementing it?

kyds3k avatar Dec 25 '20 23:12 kyds3k