嗨,我正在使用codeigniter
,我使用codeigniter
表单验证。我有一个输入叫做price
<input id="Price" name="price" class="textbox-small Verdana11-424039" type="text" name=""
tabindex="1900" />
我这样验证价格
this->form_validation->set_rules('price', 'Price', 'trim|required');
但我想验证价格只接受numbers , commas and dots
像这样 。
1000
1000.00
1,000.00
如何通过codeigniter完成这样的自定义验证,请帮助......