我添加了“validate-phoneStrict”类,输入了电话号码,但我仍然可以在电话号码字段中添加字母。 我要做什么来解决问题?
<input type="text" name="billing[telephone]"
value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text validate-phoneStrict <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?> "
id="billing:telephone" />
答案 0 :(得分:0)
您应该编写java脚本函数来进行电话号码验证
context.MapRoute(
"Employee_default",
"{controller}/{action}/{id}",
new {Controller="EmployeeHome", action = "Index", id = UrlParameter.Optional }
);