On the registration page, the gender field will be presented as a select option, and hence the requirement is set as Must select one while the comment field is a text field and theres no requirement set for it. To learn more, see our tips on writing great answers. Would Marx consider salary workers to be members of the proleteriat? To validate data at the client side, you can use HTML5 validation or JavaScript. when the submit button is pressed, it goes to a php page where these inputs are added to a database. 'error' : '' ?>", "">,