Home > Backend Development > PHP Tutorial > Thinkphp自动验证如何实现的

Thinkphp自动验证如何实现的

WBOY
Release: 2016-06-13 13:31:12
Original
765 people have browsed it

Thinkphp自动验证怎么实现的?
今天研究Yourphp系统代码的时候发现,在注册页面有一句话:

HTML code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><input type="text" id="username" name="username" class="input-text" validate="required:true,en_num:true,remote: '{:U('User/Register/checkusername')}' , minlength:5, maxlength:20"> 
Copy after login
 

通过这句话,可以实现thinkphp自动验证,比如少于5个字符的时候,他就提醒,这是怎么实现的?

------解决方案--------------------
先看他的开发手册
再分析他的代码
------解决方案--------------------
通过js验证的吧,看当前页面代码查找 .js看
------解决方案--------------------
model里面进行验证
------解决方案--------------------
搞清楚这个是前台验证还是后台验证
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