php 正则金额验证


$money_reg = '/^[1-9]\d*|^[1-9]\d*.\d+[1-9]$/';
if(!preg_match($money_reg, $money)){
$this->ajaxError('金额格式错误');
}

相关