form validation and layout