better support different form types during validation