Validate Phone Number pattern

You have a requirement to add a bank checking account number field to a view. Routing numbers must contain nine digits. How would you configure the field to support this requirement? (Choose One)

A. Use a decimal property type and make the field required.

B. Set the minimum and maximum values to 9 in a text field.

C. In an edit validate rule, configure a function to test for a routing number pattern.

D. Use an edit validate rule that validates the routing number pattern.

I think the answer is B since there is no pattern involved correct? Had there been a pattern involved in bank account number like first 2 digits followed by -(hyphen) etc then we can use edit validate rule. is my understanding correct?

The correct answer is Option D: Use an Edit Validate rule that validates the routing number pattern. In Pega, a bank routing number must contain exactly nine digits. Even though there are no special characters, the requirement of exactly nine numeric digits is still considered a pattern. Create an Edit Validate rule to check that the entered value contains only numbers and has exactly nine digits. You can use the regular expression ^[0-9]{9}$ to validate this format. Configure the routing number property as Text to preserve any leading zeros. Open the property’s Advanced tab and reference the Edit Validate rule in the Use validate field. If the user enters fewer or more than nine digits, or includes letters, the validation fails and an error message is displayed. Setting minimum and maximum values to 9 does not correctly validate the required nine-digit format