bboyle / form-validation

Validation UI for web forms
MIT License
2 stars 1 forks source link

handle HTML issues gracefully #33

Closed bboyle closed 10 years ago

bboyle commented 10 years ago

The script relies on specific HTML structures and classnames. When these don't exist, a script error can cause all validation checks to be skipped.

Example: if the script cannot locate the .label associated with an invalid element.

To reproduce, change class="label" to class="lable"

Possible fix: when .label cannot be found (0 elements) use @name or .generateId() fallbacks.