@@ -768,57 +768,57 @@ alpha_numeric_punct No Fails if field contains anything other than
768768decimal No Fails if field contains anything other than
769769 a decimal number.
770770 Also accepts a + or - sign for the number.
771- differs Yes Fails if field does not differ from the one differs[field_name]
771+ differs Yes Fails if field does not differ from the one `` differs[field_name] ``
772772 in the parameter.
773- exact_length Yes Fails if field is not exactly the parameter exact_length[5] or exact_length[5,8,12]
773+ exact_length Yes Fails if field is not exactly the parameter `` exact_length[5] `` or `` exact_length[5,8,12] ``
774774 value. One or more comma-separated values.
775- greater_than Yes Fails if field is less than or equal to greater_than[8]
775+ greater_than Yes Fails if field is less than or equal to `` greater_than[8] ``
776776 the parameter value or not numeric.
777- greater_than_equal_to Yes Fails if field is less than the parameter greater_than_equal_to[5]
777+ greater_than_equal_to Yes Fails if field is less than the parameter `` greater_than_equal_to[5] ``
778778 value, or not numeric.
779779hex No Fails if field contains anything other than
780780 hexadecimal characters.
781781if_exist No If this rule is present, validation will
782782 only return possible errors if the field key
783783 exists, regardless of its value.
784- in_list Yes Fails if field is not within a predetermined in_list[red,blue,green]
784+ in_list Yes Fails if field is not within a predetermined `` in_list[red,blue,green] ``
785785 list.
786786integer No Fails if field contains anything other than
787787 an integer.
788788is_natural No Fails if field contains anything other than
789789 a natural number: 0, 1, 2, 3, etc.
790790is_natural_no_zero No Fails if field contains anything other than
791791 a natural number, except zero: 1, 2, 3, etc.
792- is_not_unique Yes Checks the database to see if the given value is_not_unique[table.field,where_field,where_value]
792+ is_not_unique Yes Checks the database to see if the given value `` is_not_unique[table.field,where_field,where_value] ``
793793 exist. Can ignore records by field/value to
794794 filter (currently accept only one filter).
795- is_unique Yes Checks if this field value exists in the is_unique[table.field,ignore_field,ignore_value]
795+ is_unique Yes Checks if this field value exists in the `` is_unique[table.field,ignore_field,ignore_value] ``
796796 database. Optionally set a column and value
797797 to ignore, useful when updating records to
798798 ignore itself.
799- less_than Yes Fails if field is greater than or equal to less_than[8]
799+ less_than Yes Fails if field is greater than or equal to `` less_than[8] ``
800800 the parameter value or not numeric.
801- less_than_equal_to Yes Fails if field is greater than the parameter less_than_equal_to[8]
801+ less_than_equal_to Yes Fails if field is greater than the parameter `` less_than_equal_to[8] ``
802802 value or not numeric.
803803matches Yes The value must match the value of the field
804- in the parameter. matches[field]
805- max_length Yes Fails if field is longer than the parameter max_length[8]
804+ in the parameter. `` matches[field] ``
805+ max_length Yes Fails if field is longer than the parameter `` max_length[8] ``
806806 value.
807- min_length Yes Fails if field is shorter than the parameter min_length[3]
807+ min_length Yes Fails if field is shorter than the parameter `` min_length[3] ``
808808 value.
809- not_in_list Yes Fails if field is within a predetermined not_in_list[red,blue,green]
809+ not_in_list Yes Fails if field is within a predetermined `` not_in_list[red,blue,green] ``
810810 list.
811811numeric No Fails if field contains anything other than
812812 numeric characters.
813- regex_match Yes Fails if field does not match the regular regex_match[/regex/]
813+ regex_match Yes Fails if field does not match the regular `` regex_match[/regex/] ``
814814 expression.
815815permit_empty No Allows the field to receive an empty array,
816816 empty string, null or false.
817817required No Fails if the field is an empty array, empty
818818 string, null or false.
819- required_with Yes The field is required when any of the other required_with[field1,field2]
819+ required_with Yes The field is required when any of the other `` required_with[field1,field2] ``
820820 required fields are present in the data.
821- required_without Yes The field is required when any of other required_without[field1,field2]
821+ required_without Yes The field is required when any of other `` required_without[field1,field2] ``
822822 fields do not pass ``required `` checks.
823823string No A generic alternative to the alpha* rules
824824 that confirms the element is a string
@@ -832,21 +832,21 @@ valid_email No Fails if field does not contain a valid
832832 email address.
833833valid_emails No Fails if any value provided in a comma
834834 separated list is not a valid email.
835- valid_ip No Fails if the supplied IP is not valid. valid_ip[ipv6]
835+ valid_ip No Fails if the supplied IP is not valid. `` valid_ip[ipv6] ``
836836 Accepts an optional parameter of 'ipv4' or
837837 'ipv6' to specify an IP format.
838838valid_url No Fails if field does not contain (loosely) a
839839 URL. Includes simple strings that could be
840840 hostnames, like "codeigniter".
841- valid_url_strict Yes Fails if field does not contain a valid URL. valid_url_strict[https]
841+ valid_url_strict Yes Fails if field does not contain a valid URL. `` valid_url_strict[https] ``
842842 You can optionally specify a list of valid
843843 schemas. If not specified, ``http,https ``
844844 are valid. This rule uses
845845 PHP's ``FILTER_VALIDATE_URL ``.
846- valid_date No Fails if field does not contain a valid date. valid_date[d/m/Y]
846+ valid_date No Fails if field does not contain a valid date. `` valid_date[d/m/Y] ``
847847 Accepts an optional parameter to matches
848848 a date format.
849- valid_cc_number Yes Verifies that the credit card number matches valid_cc_number[amex]
849+ valid_cc_number Yes Verifies that the credit card number matches `` valid_cc_number[amex] ``
850850 the format used by the specified provider.
851851 Current supported providers are:
852852 American Express (amex),
@@ -892,25 +892,25 @@ file upload related rules::
892892======================= ========== ============================================= ===================================================
893893Rule Parameter Description Example
894894======================= ========== ============================================= ===================================================
895- uploaded Yes Fails if the name of the parameter does not uploaded[field_name]
895+ uploaded Yes Fails if the name of the parameter does not `` uploaded[field_name] ``
896896 match the name of any uploaded files.
897- max_size Yes Fails if the uploaded file named in the max_size[field_name,2048]
897+ max_size Yes Fails if the uploaded file named in the `` max_size[field_name,2048] ``
898898 parameter is larger than the second
899899 parameter in kilobytes (kb). Or if the file
900900 is larger than allowed maximum size declared
901901 in php.ini config file -
902902 ``upload_max_filesize `` directive.
903- max_dims Yes Fails if the maximum width and height of an max_dims[field_name,300,150]
903+ max_dims Yes Fails if the maximum width and height of an `` max_dims[field_name,300,150] ``
904904 uploaded image exceed values. The first
905905 parameter is the field name. The second is
906906 the width, and the third is the height. Will
907907 also fail if the file cannot be determined
908908 to be an image.
909- mime_in Yes Fails if the file's mime type is not one mime_in[field_name,image/png,image/jpeg]
909+ mime_in Yes Fails if the file's mime type is not one `` mime_in[field_name,image/png,image/jpeg] ``
910910 listed in the parameters.
911- ext_in Yes Fails if the file's extension is not one ext_in[field_name,png,jpg,gif]
911+ ext_in Yes Fails if the file's extension is not one `` ext_in[field_name,png,jpg,gif] ``
912912 listed in the parameters.
913- is_image Yes Fails if the file cannot be determined to be is_image[field_name]
913+ is_image Yes Fails if the file cannot be determined to be `` is_image[field_name] ``
914914 an image based on the mime type.
915915======================= ========== ============================================= ===================================================
916916
0 commit comments