Formatting and Validating StringsRegular expressions can be used to simultaneously format and validate an entered value. In Script 8.7, the user enters a phone number in any format. Either the end result will be a formatted phone number or the input box will turn red and the label will turn red and bold. Script 8.7. This script validates and formats a user-entered phone number.To format and validate a phone number:
|