>> I'm trying to create a new fraction pattern for validation using Massimo's
>> TMT Validator but it does not validate correctly.
>>
>> tmt_globalPatterns.fraction = new RegExp("^\d* \d*\/{1}\d*$|^\d*$");
>>
>> It's supposed to accept numbers and/or fractions.
>> Please advise.
>
>Whenever you use the new RegExp() syntax in JavaScript you need to escape 
>the backslashes by doubling them.
>See also the patterns that ship with the Validator
>
>Hope it will help
>

Yes that solved it. Thank you. Very useful tool, btw. I encourage developers to 
try your validation tool.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:233510
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to