Ticket #177 (closed defect: fixed)
Regex validator should accept regex string, not regex object
| Reported by: | idbr | Owned by: | mpo |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.4 |
| Component: | modules/kauri-forms | Version: | trunk |
| Keywords: | regex validator | Cc: |
Description
Regex validator in a kauri form is not working:
+validators:
{
required : {},
regex : { regex: "[1-9][0-9][0-9][0-9]" }
}
It seems the basic regex validator needs a regex object (and not a regex string), which is quite impossible in json as far as I know:
+validators:
{
required : {},
regex : { regex: /[1-9][0-9][0-9][0-9]/ }
}
See attachment for fix
Attachments
Change History
Note: See
TracTickets for help on using
tickets.