how do i write a regular expression in validation-regex that allows everything except the string "Enter One", which is to be entered in a text box.
I need the regular expression which is to be placed in validation-regex
try this "[^Enter One]"
This would accept all text which gets started with "Enter One". ^ sign denotes the start of the text.
Please elaborate more on your requirements, such as:- Do you need that the text should not start with "Enter One" OR- It should not end with "Enter One" OR- It should not come anywhere within written text. OR- It should not be specific as "Enter One"
It should not be specific as "Enter One" i.e not equals to "Enter One" is the requirement.
If I were faced with this requirement, I'd look at using FormAPI rather than the validation-regex in the DCR. You should be able to do your check more easily with js string comparison and then use IWItem.isValid(true|false) depending on the result of your comparison. IIRC, FormAPI is now the recommended method for form validation.
Hi ,this can be done through javascript very easily but the thing is i need the teamsite validation(validation-regex).I tried thie folowing one,<text size="60" maxlength="150" validation-regex = "[^(Enter One)]"><default>Enter One</text>But that fails for some conditions likeEnter OneeeEnter OnenEnter OnetrWhat would be the exact regular expression ?