function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suma GangaSuma Ganga 

Need help on validation rule for Name Field

Hi Techie Friends,

I have a requirement like , user should not enter any spl cheracters and numbers repeated characters like xxx, yyy,zzz etc.. for a name field.

for this i have written a validation rule like below (which is working for spl chars & numbers only)::

OR( 
NOT(REGEX( FirstName , "^[a-z A-Z]*$")), 

ISBLANK(FirstName) 
)

i have to add regex for repeated characters, for this i added like below (not working )
[(x)+] added like this::
OR( 
NOT(REGEX( FirstName , "^[a-z A-Z][(x)+]*$")), 

ISBLANK(FirstName) 
)

please help on this validation rule..


-- suma.
sandeep sankhlasandeep sankhla
Hi Suma,

Please refer below link for all kind of validation you need..Please check and let me know if it helps you..
http://regexlib.com/(X(1)A(vbQ3rx5cPsMLfO1yxIlAAO0el_rtqF8LwM6TAT1GQIQ94edc65gHvlVZCxxQxfJKgy5-tVsW_2e_CuqFyAGMyHNF91IG0BURoKc1OW5bq-HeVz514o-yDb6bqTyjtOpJVH257RESi4eTcqPpCNGDx7FcplpNgCCB8kYf-VJtTg6g1UlkfVGFvfa7DcyLiYTB0))/Search.aspx?k=password&AspxAutoDetectCookieSupport=1

Thanks,
Sandeep
Suma GangaSuma Ganga
Hi Sandeep,

Thank you for your reply.

i gone through the link u provided. But, still i didnt find regex pattern for repeated characters . 

i found the pattern (a-z A-Z){3,} from another source, but, if i merge both i am not able to enter string "test" also...

OR( 
NOT(REGEX( FirstName , "^[a-z A-Z][(x)+]*$")), 

ISBLANK(FirstName) 
) and (a-z A-Z){3,}

any help!!!!
Thanks in advance.

--Suma.
sandeep sankhlasandeep sankhla
Hi
please find below link to remove duplicate letters from string..
http://stackoverflow.com/questions/17885329/regex-to-remove-duplicate-letters

thanks,
Sandeep