i am trying to validate the contact no. it must be started with 7,8,9 only.

Ex: 9493654336==> NO ERROR 6754294763==> ERROR

Can anyone please help me out


You can use this formula in validation rule

NOT(BEGINS(Field, '7') || BEGINS(Field, '8') || BEGINS(Field, '9')) Where field is of type Phone.

| improve this answer | |

NOT( REGEX( SObject,"(\D[7-9]{1}\D?[0-9]{2}\D?)[\s][0-9]{3}-[0-9]{4}"))

Hi friends this validation is perfect for this scenario

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.