thinkphp Automatic validation issues

Source: Internet
Author: User
Usermodel has been used in automatic validation of registration forms, so I don't know how to use automatic authentication in the login form.
It seems to be possible to implement a custom validation condition or validation time, but how exactly?
Help.


Reply to discussion (solution)

Is it true that no one knows? Are you the great God?

Think document it's very clear to look at the document to
The think framework can be said to be very studious, the Chinese people write their own documents are in English and speak very detailed

$UserModel->create ()
Create Method! Automatic verification, auto-completion, etc.

Because the user table is a table that is frequently accessed on various pages, I use class Usermodel for automatic validation on every user table. But the manual only provides "validation fields, validation rules, error hints, [validation conditions, additional rules, validation time]" without providing the parameters I need.

Is that I call create with a rule in class Indexaction function index (), while the class FormAction function insert () uses a different set of validation rules.

I kind of want to give up think, you feel too high.

I kind of want to give up think, you feel too high.
After writing for 2 years tp, I also gave up!

Problem solved, is to ask a teacher to solve

  • 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.