core-4428 refactor validation in the form