I have requirement where password must contain 8 characters, having one capital letter & one numeric or special character. I have written pattern and assigned it to js variable. But when i tried to access that tpl file smarty throws exception for "comma".
var strPattern = /^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])([a-zA-Z0-9]{8,})$/;
strPattern is js variable.
How should I need to handle it in smarty ?
Error -
( ! ) FATAL ERROR: UNCAUGHT --> SMARTY COMPILER: SYNTAX ERROR IN TEMPLATE "CHANGE_PASSWORD.TPL" ON LINE 72 "VAR STRPATTERN = /^(?=.[0-9])(?=.[A-Z])(?=.[A-Z])([A-ZA-Z0-9]{8,})$/;" - UNEXPECTED ",", EXPECTED ONE OF: "}" <-- THROWN IN C:\WAMP\WWW\MYPROJECT\SMARTY-3.1.18\LIBS\SYSPLUGINS\SMARTY_INTERNAL_TEMPLATECOMPILERBASE.PHP ON LINE 72*