You need to sign in to do that
Don't have an account?

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.