gitana / alpaca

Alpaca provides the easiest way to generate interactive HTML5 forms for web and mobile applications. It uses JSON Schema and simple Handlebars templates to generate great looking, dynamic user interfaces on top of Twitter Bootstrap, jQuery UI, jQuery Mobile and HTML5.
http://www.alpacajs.org
Other
1.29k stars 371 forks source link

Alpaca doesn't take into consideration if the pattern contains length limit #743

Open Atanasovska opened 4 years ago

Atanasovska commented 4 years ago

I notice a problem when using patterns. If the pattern contains length it is not taken into consideration. For example this pattern "pattern": "[0-9]{5}" should permit only 5 numbers, but it validates the numbers and not the length. To fix this I added min and max length, but it is a big problem if i have this kind of pattern ^[0-9]{1,3}([a-zA-Z]?)$. How can i solve this? Thanks