-
-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to add is-valid class after validation #113
Comments
|
with
lot's of repeated code. is there a better way? i'd imagine something like an "error_class" argument would be nice, eg:
|
I found this ticket right after submitting #126 , as far as I can tell, {% if form.myfield.errors %}
{% render_field form.myfield class+="form-control is-invalid" title=form.myfield.label %}
{% else %}
{% render_field form.myfield class+="form-control" title=form.myfield.label %}
{% endif %} does not handle the case of valid field from validated form, and we need something like
This is quite tedious if we are doing this for all fields, #126 proposes the shortening of the above to
or even better
|
I understand there is a way to add error css class, is there a way to add the is-valid class after validation?
The text was updated successfully, but these errors were encountered: