Article Details
Id:17258
Product:finPOWER Connect
Type:NEW
Version:3.03.03
Opened:04/08/2020
Closed:06/08/2020
Released:01/10/2020
Job: J024767

HTML Widgets; Phone number and email validation and formatting added to widget.UI.TextBox control

The ability to automatically validate and, optionally, reformat email and phone numbers has been added to the widget.UI.TextBox control.

The following creation options have been added:

  • dataType
    • Either: email or phone
  • dataTypeReformat
    • true to reformat value providing the control is not read-only or null (the default) to prompt the User to reformat the value

The following properties can also be used to update these values:

  • DataType
  • DataTypeReformat

By default, the value will only be validated when the User changes the value and moves to a different control. If you wish to validate the value from code (e.g., in the Fields_Load or Fields_Update functions), use the DataTypeValidate([reformat]) method.

NOTE: Since validation may be asynchronous, validation must also be performed server-side, e.g., from the Script Code when moving to the next page of a wizard.

From an HTML Widget CSS customisation point-of-view, this simply adds the 'is-data-invalid' class to the HTML input control hence, overriding this class allows the default orange border to be customised.

Both the "Public1" and "SemUI" widget styles have been updated to support the orange border.

The following HTML Widgets have been updated:

  • HtmlWidget_ClientNew_Individual
    • Version: 1.10 (6/08/2020)
  • HtmlWidget_ClientNew_Organisation
    • Version: 1.08 (6/08/2020)
  • HtmlWidget_ClientContactMethod
    • Version: 1.10 (6/08/2020)

NOTE: Where a Contact Method is known, the "Format Phone Numbers upon entry" option will be used to either automatically format the phone number (if it is checked) or, if it is unchecked, simply to prompt the User to update value.