How to avoid special charecters in create user form
Hi all,
I am new to Sun IDM.Please u people have to help me in giving the solution.
Actually,in create user form ,we have first name and last name text fields.These two fields accept any special charecters.I want these fields to accept only alphabets.Do i need to create new rule for it?Please tell me the steps to be done to allow only alphabetic charecters in this fields.Thanks in advance,
regards,
suresh
# 2
I BPE, "allowed values" property,i browsed and choosed isAlpha rule. In the isAlpha rule i mentioned global.firstname instead of "teststr"its throws the below mentioned exception
ERROR:Couldn't find method setAllowedValues(int) in class com.waveset.ui.util.html.Text ==> java.lang.NoSuchMethodException: com.waveset.ui.util.html.Text.setAllowedValues(int)
Have i made any mistake in invoking the rule,please let me know.
# 4
Hi,
I should thank for the quick response u have done.But,still my problem was not solved.I did wat u hav said in the last reply...Now iam getting "1" in that create user form.I have send the XML code of the "isAlpha" and "Firstname"..Please check whether i have done any mistake..waiting for ur reply.
<Rule name='isAlpha'>
<Description>Tests to see if testStr is comprised of only alpha characters.</Description>
<RuleArgument name='testStr' value='testStr'/>
<block>
<defvar name='testList'>
<appendAll>
<rule name='Alpha Numeric Rules:AlphaCapital'/>
<rule name='Alpha Numeric Rules:AlphaLower'/>
</appendAll>
</defvar>
<containsAll>
<ref>testList</ref>
<rule name='Alpha Numeric Rules:stringToChars'>
<argument name='testStr' value='$(testStr)'/>
</rule>
</containsAll>
</block>
</Rule>
<Field name='global.firstname'>
<Display class='Text'>
<Property name='title' value='_FM_FIRSTNAME'/>
<Property name='size' value='32'/>
<Property name='maxLength' value='128'/>
</Display>
<Validation>
<rule name='Alpha Numeric Rules:isAlpha'>
<argument name='global.firstname'/>
</rule>
</Validation>
</Field>
# 5
your Validation should be
<Validation>
<cond>
<isFalse>
<rule name='Alpha Numeric Rules:isAlpha'>
<argument name='global.firstname'/>
</rule>
</isFalse>
<s>Alpha value required</s>
</cond>
</Validation>