【问题标题】:adding regular expression to form_validation in codeIgniter在codeIgniter中将正则表达式添加到form_validation
【发布时间】:2012-07-19 13:34:26
【问题描述】:

我有许多具有相同结构的表单。对于用户数据,它们都是相同的。这些表单的 id 是 addComment1、addComment2、addComment3 等。 我想为每个人定义表单验证。但我不知道他们的号码。我想使用正则表达式在 form_validation.php 中定义它们。它们都具有相同的结构,并且它们的 form_validation 函数都是相同的。如何使用正则表达式来做到这一点?

【问题讨论】:

    标签: regex codeigniter validation


    【解决方案1】:
    $this->form_validation->set_rules('field name', 'human name', 'regex_match[expression]'); 
    

    http://ellislab.com/forums/viewthread/195050/

    使用搜索。

    【讨论】:

      猜你喜欢
      • 2012-11-26
      • 1970-01-01
      • 2012-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多