Apply Regex Validation custom control is the Regex based field validation for text fields.
Instructions to use:
- Install the managed solution (available with the most latest release on GitHub Repository) in your Dynamics CRM instance.
- Open the Form Editor for the desired form of the required entity, select the field supported by this control (SingleLine.Text, SingleLine.Phone, SingleLine.Email) and click Change Properties and then select the Controls tab.
- In the Controls tab, click the Add Control... button, select Apply Regex Validation in the list of available controls and click Add.
- Select the types of client for which this control will be used.
- Property Input Text will be selected by default.
- Insert the Regex which you want to apply to the field for validation in the mandatory Regex Expression property.
- Insert the message which you want to show the user in the Field Notification property.
- If Field Notification property is left empty, default message will be Incorrect Format.
- Save settings of the custom control, save and publish the entity form.
Control Behaviour:
- On change of field value, if the value in the field doesn't satisfies the Regex, notification will be on field.
- On save of record, if the error notification on field exists, notification will be on top of form as well(OOB behaviour).