Local JavaObject &oPhoneNumExpression = CreateJavaObject("java.lang.String", "\+{0,1}[0-9\s\-\(\)]+");
Local JavaObject &oPhoneNum = CreateJavaObject("java.lang.String", &PhoneValue);
If &oPhoneNum.matches(&oPhoneNumExpression) = False Then
MessageBox(0, "", 0, 0, "Enter valid phone number");
End-If;
Regular Expression "\+{0,1}[0-9\s\-\(\)]+" : It allows a number + in starting and - in the middle of the number.
&PhoneValue : Contains the entered phone number value.
No comments:
Post a Comment