使用OR条件进行cakephp3验证

时间:2019-04-16 00:06:45

标签: php validation cakephp-3.x

我正在使用CakePHP3。我想允许两种类型的数据用于地址字段:IPv4或FQDN。如果地址匹配ipv4或FQDN,是否可以返回成功验证?

我尝试了这个但没有成功:

func tableView(_ tableView: UITableView,
                   heightForHeaderInSection section: Int) -> CGFloat {
        return height_DefaultSection
    }

func tableView(_ tableView: UITableView,
                   viewForHeaderInSection section: Int) -> UIView? {

        return tableView.dataSource?.tableView(tableView, numberOfRowsInSection: section) == 0 ? nil: headerView(tableView: tableView, section: section)
    }

0 个答案:

没有答案
相关问题