add ip validator in some form
| | |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '192.168.0.105', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISIPV4', |
| | | 'errmsg'=> 'ip_address_error_empty'), |
| | | 'errmsg'=> 'ip_address_error_wrong'), |
| | | ), |
| | | 'value' => '', |
| | | 'width' => '15', |
| | |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '255.255.255.0', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'netmask_error_empty'), |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISIPV4', |
| | | 'errmsg'=> 'netmask_error_wrong'), |
| | | ), |
| | | 'value' => '', |
| | | 'width' => '15', |
| | |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '192.168.0.1', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'gateway_error_empty'), |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISIPV4', |
| | | 'errmsg'=> 'gateway_error_wrong'), |
| | | ), |
| | | 'value' => '', |
| | | 'width' => '15', |
| | |
| | | 'ip_address' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'ip_error_empty'), |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISIPV4', |
| | | 'errmsg'=> 'ip_error_wrong'), |
| | | 1 => array ( 'type' => 'UNIQUE', |
| | | 'errmsg'=> 'ip_error_unique'), |
| | | 2 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^[0-9\.]{7,15}$/', |
| | | 'errmsg'=> 'ip_err'), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |