implement input validation for form editor