QuestionQ12

Setup/configuring Adobe Commerce Cloud

An Adobe Commerce developer has added a new configuration field in the Admin area. The option path is general/store_information/out_of_hours_phone.

With simplicity in mind, how should the developer ensure that this option contains a valid US telephone number?

  • A Add <validate>phoneUS</validate> to the field in system.xml.
  • B Create a backend model to check the validity of the phone number entered.
  • C Add <validate type="phoneUS"/> to the field in system.xml.
Explanation

Adobe Commerce applies built-in validation rules specified in a system configuration field’s <validate> element. The phoneUS rule is the documented validator for US telephone numbers, so it provides the required validation without a custom backend model.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!