【发布时间】:2016-09-30 17:13:38
【问题描述】:
输入字段: 如何自定义在 html 5 的输入字段中使用的模式中的错误消息。
当前消息显示“请输入与模式匹配的值”此消息在自定义“仅允许数字”后显示
<?= $this->Form->input('mobile',
['pattern'=>"^(?!0)[0-9]{10}$",
'label' => false, 'id' => '',
'class' => 'form-control reg_mobile_input',
'required' => true,'id'=>'',
'placeholder'=>'without initail zero',]);
?>
【问题讨论】:
标签: html forms validation cakephp cakephp-3.0