Home > Backend Development > PHP Tutorial > php framework - When thinkPHP uses function to automatically verify, can it call back an error message?

php framework - When thinkPHP uses function to automatically verify, can it call back an error message?

WBOY
Release: 2016-07-06 13:52:56
Original
1110 people have browsed it

<code>array('user', 'checkLength', '用户名必须在 3-5 位', 0, 'function', 3,array(3,5)),</code>
Copy after login
Copy after login

Can this 'username must be between 3-5 characters' passed out from function checkLength()?

Reply content:

<code>array('user', 'checkLength', '用户名必须在 3-5 位', 0, 'function', 3,array(3,5)),</code>
Copy after login
Copy after login

Can this 'username must be between 3-5 characters' passed out from function checkLength()?

Verify that the length tp is written

<code>array('user','3,5','用户名必须在 3-5 位',0,'length',3), //验证字符长度</code>
Copy after login

What is the use of sending it? This error is triggered $model->getError(); You can get it

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template