Required field validation is not working