After conducting your own validations to the Widget, if you need to add it to the array, you may rely on the jQuery .push() method.

Actions and validations

Consider that in order to make your Widget eligible for actions and validations within the form, you will need to include its data-type property set with the same data type defined for the xpath property.:

When doing so, apart from your Widget showing up as candidate to trigger actions and validations (or as a target reacting to them), you will see that it will list its current validations for instance, as implemented/overridden in the IsValid() function:

Even though you may have your Widget become eligible for actions and validations, consider that not entirely all actions are supported for your Widget, especially depending on its xpath data type.