refer to https://help.liferay.com/hc/en-us/articles/360018162031-Forms-and-Validation