How to use the mathod isValid on WidgetEditor


I'm trying to create my own widget on WidgetEditor, but when I set true to the "require" attribute my form does not validate if the field is empty.

I have seen that there is a function responsible for validating the field "isValid(array invalidElements)", but I don't understand how to use this function.

Can someone give me an example?

Comments (1)


Dear Luan

As a good practice, you should always keep the preset properties used by Bizagi such as: visible, editable and required.

Other properties such as value align, label align, layout, etc, would need to be implemented in the Widget’s behavior.

While configuring your widget in the form mark it as required.

Please refer to following article for details.

Best Regards