Menu

#28 Wrong validation pattern for positiveInteger (with solution)

open
nobody
None
5
2012-12-21
2010-06-04
Anonymous
No

The pattern validation associated to content bound with positiveInteger type is not accepting 1,2,3

The asscociated pattern in xsltforms.js line 4927

"positiveInteger" : \{
    "base" : "xsd\_:integer",
    "patterns" : \[ "^\[+\]0\*\[1-9\]\[0-9\]\*$" \]
\},

has to be replaced by

"positiveInteger" : \{
    "base" : "xsd\_:integer",
    "patterns" : \[ "^\[+\]?0\*\[1-9\]\[0-9\]\*$" \]
\},

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.