BZ-1129694: validations and refactoring in forms