Skip to content
Permalink
Browse files
[JENKINS-11513] Change error message from 'number' to 'integer'
- hudson-behavior.js checks if value of INPUT.number is an integer
- HTML5 <input type=number> checks if value of INPUT is a number (including floating point)
- It's better to change error message for INPUT.number to 'integer'
  • Loading branch information
ohtake authored and kohsuke committed Nov 7, 2011
1 parent fd7b09c commit 597a7ddc0f85ea12d842e0ba23ab942ec1312a1a
Showing with 3 additions and 3 deletions.
  1. +3 −3 war/src/main/webapp/scripts/hudson-behavior.js
@@ -666,10 +666,10 @@ var hudsonRules = {
// validate required form values
"INPUT.required" : function(e) { registerRegexpValidator(e,/./,"Field is required"); },

// validate form values to be a number
"INPUT.number" : function(e) { registerRegexpValidator(e,/^(\d+|)$/,"Not a number"); },
// validate form values to be an integer
"INPUT.number" : function(e) { registerRegexpValidator(e,/^(\d+|)$/,"Not an integer"); },
"INPUT.positive-number" : function(e) {
registerRegexpValidator(e,/^(\d*[1-9]\d*|)$/,"Not a positive number");
registerRegexpValidator(e,/^(\d*[1-9]\d*|)$/,"Not a positive integer");
},

"INPUT.auto-complete": function(e) {// form field with auto-completion support

0 comments on commit 597a7dd

Please sign in to comment.