What are the advantages of using activeform to build a form in yii2?

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.