Added validation for forms