Include the validation script and the validator functions
<script src="validation.js"></script>
<script src="regex-validators.js"></script>
Crete a div containing div class="errors
and a sibling input field and attach a data-validate="validationFunctionName" to each input field
<div class="form-control">
<ul class="errors">
<li>contains at least one alphabetic character</li>
<li>contains at least one digit or a non-alphabetic character</li>
</ul>
<input type="text" data-validate="isPasswordComplex">
</div>
Can be used for frontend validation of following input fields:
- digital place separator
- valid date
- maximum/minimum date
- valid time
- username characters
- password characters
- password complexity
- email validity