[ref] better form validation