Skip to content

Commit

Permalink
Fix issues
Browse files Browse the repository at this point in the history
- Fixed issue about email validation (#5)
- Fixed issue about number validation when entering negatif number
  • Loading branch information
hsnaydd committed Nov 10, 2013
1 parent 4ff167f commit 30d50af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions validetta-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions validetta.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* Validetta - Client-side form validation jQuery plugin
* Version: 0.4.0 (01 November 2013)
* Version: 0.5.0 (10 November 2013)
* @jQuery Requires: v1.7 or above
* @Browser Support : ie8 or above, and all modern browsers
*
Expand All @@ -24,9 +24,10 @@
// RegExp for input validate rules
reg = new RegExp( /(minChecked|maxChecked|minSelected|maxSelected|minLength|maxLength|equal|customReg)\[[(\w)-_]{1,15}\]/i ),
// RegExp for mail control method
regMail = new RegExp( /^[a-zA-Z]{1}[\d\w\.-]+@[\d\w-]{3,}\.[\w]{2,3}(\.\w{2})?$/ ),
// @from ( http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state-%28type=email%29 )
regMail = new RegExp( /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/ ),
//RegExp for input number control method
regNumber = new RegExp( /^[\+][0-9]+?$|^[0-9]+?$/ );
regNumber = new RegExp( /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/ );
/**
* Form validate error messages
*/
Expand Down

0 comments on commit 30d50af

Please sign in to comment.