File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 5959 var cfg = new $ . fn . RestrictedTextFieldConfig ( ) ;
6060
6161 cfg . addType ( "vowels" , / ^ [ a e i o u ] * $ / , null ) ;
62- cfg . addType ( "additionExpr" , / ^ \d + \+ \d + $ / , / ^ \d + $ | ^ \d + \+ $ / ) ;
62+ cfg . addType ( "additionExpr" , / ^ \d + \+ \d + $ / , / ^ \d + \+ ? $ / ) ;
6363 }
6464
6565 function flashBorder ( jqField , cssClass , times , delayMillis ) {
@@ -327,7 +327,7 @@ <h3>Complex type: mathematical expression</h3>
327327 < li > An integer</ li >
328328 < li > An integer followed by a plus sign</ li >
329329 </ ul >
330- < p > The regular expression for that is < code > /^\d+$|^\d+\+$ </ code > . Putting it all together, we get:</ p >
330+ < p > The regular expression for that is < code > /^\d+\+?$/ </ code > . Putting it all together, we get:</ p >
331331 < code > cfg.addType( "additionExpr", /^\d+\+\d+$/, /^\d+$|^\d+\+$/ );</ code > < br /> < br />
332332 < input type ="text " id ="txtAdditionExpr " />
333333 </ div >
You can’t perform that action at this time.
0 commit comments