0

I have created a component. In this component I have created the form fields using xml file. In xml file I set the attribute required='required' of a text field and that field become a required field automatically.

But Now I have a component which has created the form in a php file using html input tags. And now I want to make a textfield required in that form so how will I do this? As in the input tag I can't enter the required='required' attribute.

So what should I do with this so that the textbox becomes a required field and without entering some text in that field it should not be submitted.

4

1 回答 1

0

通过以下网站为 php 表单字段添加验证。

http://buildinternet.com/2008/12/how-to-validate-a-form-complete-with-error-messages-using-php-part-1/

http://phpmaster.com/form-validation-with-php/

于 2012-09-07T11:36:21.563 回答