Skip to content

rostamiani/RegexForm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RegexForm

An easy regex validation fot HTML forms.

###Usage: Just add this file to head:

<script src="path_to_js_files/jquery.min.js"></script>
<script src="path_to_js_files/regexform.min.js"></script>

No other javascript is needed! Just add these data attributes to your input tags:

  • data-regexform : Your Regex rule
  • data-regexform-alert: The error alert for invalid input

###Example:

<input data-regexform='^0\d[10]$' data-regexform-alert="Invalid mobile phone number" name="Phone" type="text">

Then add these data attributes to define regular expression rules

Please request any feature you need

###In the future

  • Show error messages in below input tag instead of showing alertsa
  • Bootstrap support
  • custom css on error

About

n easy regex validation fot HTML forms.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published