From c6ae2ae252ec1b150c0d88666a6609f1193f268b Mon Sep 17 00:00:00 2001 From: James O'Toole Date: Sun, 15 Feb 2015 01:37:57 +0000 Subject: [PATCH] Incorrect attribute corrected, data-parsley-regex should be data-parsley-pattern --- wtformsparsleyjs/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wtformsparsleyjs/core.py b/wtformsparsleyjs/core.py index a46dc27..1bf5ddb 100644 --- a/wtformsparsleyjs/core.py +++ b/wtformsparsleyjs/core.py @@ -29,7 +29,7 @@ def parsley_kwargs(field, kwargs): Generate *kwargs* from the validators present for the widget. - Note that the regex validation relies on the regex pattern being compatible with + Note that the regex validation relies on the eegex pattern being compatible with both ECMA script and Python. The regex is not converted in any way. It's possible to simply supply your own "parsley-regexp" keyword to the field to explicitly provide the ECMA script regex. @@ -115,7 +115,7 @@ def _regexp_kwargs(kwargs, vali): regex_string = vali.regex.pattern else: regex_string = vali.regex - kwargs[u'data-parsley-regexp'] = regex_string + kwargs[u'data-parsley-pattern'] = regex_string def _url_kwargs(kwargs): kwargs[u'data-parsley-type'] = u'url'