uniform-team / Uniform-Validation-Language

A logic language to simplify and improve online form validation.
Apache License 2.0
1 stars 0 forks source link

Error out on submit when served with no Uniform code #55

Open dgp1130 opened 7 years ago

dgp1130 commented 7 years ago

I made a mistake where I accidentally forgot to include the Uniform code. Basically I forgot the line:

<script>uniform.options.href(...)</script>

This resulted in a missing root-level valid tag error, which is confusing and misleading. If the user never called parser.parse(), but they have clicked submit, then we should throw some kind of error saying no Uniform script was included.

dgp1130 commented 7 years ago

Updated so that if the user submits before parser.parse() is called, then it shows a special alert message directed at the developer pointing out that they need to call parser.parse() directly or indirectly through options.href().