This is an adaptation of the jQuery Live Form Validation found at http://www.geektantra.com/2009/09/jquery-live-form-validation/ for Twitter Boostrap. The modified script will allow for live form validation using the Twitter Bootstrap HTML pattern for forms.
114
stars
21
forks
source link
Form with invalid field followed by valid file field does not mark any fields as erroneous on submit #3
I had a form with two fields, both validated. The first field required a value, and defaulted to having no value. The second field was type=file and did not require a value. Without touching either of the fields, I hit the submit button for the form. The first field was not marked as erroneous (unexpected behavior), nor was the second field (expected behavior). I think I fixed the problem. I changed this:
You were removing all error messages and taking the 'error' class off of all control-group div's, instead of just those associated with the field that's valid.
I had a form with two fields, both validated. The first field required a value, and defaulted to having no value. The second field was
type=file
and did not require a value. Without touching either of the fields, I hit the submit button for the form. The first field was not marked as erroneous (unexpected behavior), nor was the second field (expected behavior). I think I fixed the problem. I changed this:To this:
You were removing all error messages and taking the 'error' class off of all control-group div's, instead of just those associated with the field that's valid.