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.

Exactly, this is also documented here: Proxy Object Limitations (https://discuss.liferay.com/t/how-to-put-some-validation-such-as-expression-builder-or-from-headless-endpoint-on-proxy-objects/133/2?u=marcel_tanuri)

However, you can write validation steps in the micro service which bridges the message to the target external system. And then, use http status to return an error back to the client, which is Liferay in this case

Hi Tim, Thank you for your answer.