You need to sign in to do that
Don't have an account?
![Kirtan Patel 9 Kirtan Patel 9](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
REGEX Validation rule to prevent number in text field
I have a requirement to prevent Numeric values in a Text Field and first letter in text field should be capitalized.
I have tried many times but its not working, any help would be appreciated :
AND( RecordType.DeveloperName == 'Home_Lending',
OR(
AND(NOT(ISBLANK(FirstName)),OR(REGEX( FirstName, '\\d+'),LEFT(UPPER(FirstName),1) <> LEFT(FirstName,1))),
AND(NOT(ISBLANK(LastName)),OR(REGEX( LastName, '\\d+'),LEFT(UPPER(LastName),1) <> LEFT(LastName,1)))
)
)
I have tried many times but its not working, any help would be appreciated :
AND( RecordType.DeveloperName == 'Home_Lending',
OR(
AND(NOT(ISBLANK(FirstName)),OR(REGEX( FirstName, '\\d+'),LEFT(UPPER(FirstName),1) <> LEFT(FirstName,1))),
AND(NOT(ISBLANK(LastName)),OR(REGEX( LastName, '\\d+'),LEFT(UPPER(LastName),1) <> LEFT(LastName,1)))
)
)
You can perhaps use TRIM everywhere for FirstName and LastName.
Otherwise, there is also the problem of numbers inside a text: ( ABC123DEF )
REGEX( TRIM( FirstName ) , '.*\\d+.*') // characters before or after a number could exist.
All Answers
You can perhaps use TRIM everywhere for FirstName and LastName.
Otherwise, there is also the problem of numbers inside a text: ( ABC123DEF )
REGEX( TRIM( FirstName ) , '.*\\d+.*') // characters before or after a number could exist.