What are the advantages of using activeform to build a form in yii2 ?, Currently, I know that it can be used with rule automatic verification. In addition to this, what are the advantages? What are the disadvantages of using html to directly submit a form? What are the advantages of yii2 using activeform to build a form ?, At present, I know that it can work with rule for automatic verification. In addition to this, what are the advantages? What are the disadvantages of using html for direct form submission?
Reply content:
What are the advantages of using activeform to build a form in yii2 ?, At present, I know that it can work with rule for automatic verification. In addition to this, what are the advantages? What are the disadvantages of using html for direct form submission?
According to my understanding, activeform builds a form, and the front-end can generate verification rules directly according to the Model's rules definition. The advantage of Yii2 is that it does not need to write front-end code, at least I understand this. Write the front-end code according to the backend idea and use a few widgets.
Crsf attack and defense policies improve security. For example, if you use yii2 to write a server and directly use a client to send a post Request, 400 Bad Request may occur.
It should be convenient for backend users to write html code.
To some extent, frontend js verification and backend data processing verification are not required.