Form validation API structure