How to apply validation rules on Proxy objects
How to put some validation ( such as expression builder or from Headless endpoint ) on Proxy Objects
Because they are not persisted in Liferay, proxy objects do not inherently support validation. Since the data source would usually also have other ways to input data, Liferay could not guarantee that all data conforms to the validation rules.
Due to this limitation, best practice would be to perform the validation on the system that persists the data.
For a good user experience it would still be good to add validation in any input masks, which can be achieved by creating form fragments and then using these in a form container on your page. The default form fragments provided by Liferay will use the object validations, which in proxy objects you are missing as stated above.
Hi @haij2ee
Jumping in to provide some additional documentation to support @Tim & @Marcel_Tanuri 's feedback:
-
Proxy Object Limitations proxy object data does not persist in Liferay’s database.
-
Validation & Masking - As @Tim mentioned, this outlines how you can apply validations & input masks at the form layer in Liferay.
-
As a power user, I want to store and retrieve objects data from Salesforce - Should you want to try @Marcel_Tanuri’s suggestion, you you can configure the proxy object data to be stored within a client extension.