Skip to content

Commit

Permalink
Fixed bug about number regexp pattern
Browse files Browse the repository at this point in the history
When entering value like "12." , validator was returning true
  • Loading branch information
hsnaydd committed Jun 11, 2014
1 parent 923cb90 commit 428b288
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validetta.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// @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( /^[\-\+]?\d+\.?\d*$/ ),
regNumber = new RegExp( /^[\-\+]?\d+\.?\d+$/ ),
/**
* Form validate error messages
*/
Expand Down

0 comments on commit 428b288

Please sign in to comment.