444683462
V2EX  ›  问与答

thinkphp 自动验证的 require 无效

  •  
  •   444683462 · Mar 16, 2015 · 2048 views
    This topic created in 4102 days ago, the information mentioned may be changed or developed.

    array('department_name','require','名称必须'),
    array('department_name','require','部门名称不能为空',1,'regex',3),
    这两种方式都无效,其他

    array('department_name','1,8','部门名称最多8个字',1,'length',3),
    array('department_name','','该部门名称已经存在,不要重复',1,'unique',1),
    array('department_sort','/^([1-9]\d*|[0]{1,1})$/','部门排序只能是正整数或者0',2,'regex',3),
    都是有效的

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1125 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 18:08 · PVG 02:08 · LAX 11:08 · JFK 14:08
    ♥ Do have faith in what you're doing.