
Static Public Member Functions | |
| static final boolean | compareTo (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | contains (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | endsWith (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | isAlphabetic (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | isAlphaNumeric (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | isStringEmpty (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | isValidEmailAddress (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | isValidURL (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | length (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | maxLength (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | minLength (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | startsWith (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | stripHTML (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | toLowerCase (Object object, Object attribute, String key, NSDictionary params) |
| static final boolean | toUpperCase (Object object, Object attribute, String key, NSDictionary params) |
Static Public Attributes | |
| static final String | EQUAL = "==" |
| static final String | GREATER_EQUAL = ">=" |
| static final String | GREATER_THAN = ">" |
| static final String | LESS_EQUAL = "<=" |
| static final String | LESS_THAN = "<" |
| static final String | NOT_EQUAL = "!=" |
Strings. These rules are part of the default set of 'QuickRules'.
| static final boolean compareTo | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
Performs a string comparision using the specified params dictionary.
The required key-value pairs include:
"Operator" = The specified operator string. (i.e. "==", "!=", ">", ">=", "<", or "<=" )
"RightOperand" = The String to compare the attribute to.
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true if the comparision succeeds; otherwise, false | static final boolean contains | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
Verifies that the attribute contains the specified string.
The required key-value pairs include:
"Contains" = The string of interest.
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true if the attribute contains the specified string; otherwise, false | static final boolean endsWith | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
Verifies that the attribute ends with the specified string.
The required key-value pairs include:
"EndsWith" = The string of interest.
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true if the attribute ends with the specified string; otherwise, false | static final boolean isAlphabetic | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
Verifies that the attribute contains only alphabetic characters. (i.e. 'a'-'z' || 'A'-'Z')
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true if the string only contains alphabetic characters; otherwise, false | static final boolean isAlphaNumeric | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
Verifies that the attribute contains only letters or numbers. (i.e. 'a'-'z' || 'A'-'Z' || '0'-'9')
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true if the string only contains letters or numbers; otherwise, false | static final boolean isStringEmpty | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
Determines whether the specified attribute is empty.
An empty String is defined as a String that contains at least one non-white-space character.
(i.e. This method will return true if the attribute only contains spaces, CRs, NLs, etc.)
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true if the string is empty; otherwise, false | static final boolean isValidEmailAddress | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
Verifies the attribute is a valid email address. (Proper Syntax)
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true if the address is valid; otherwise, false | static final boolean isValidURL | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
Verifies the attribute is a valid url. (Proper Syntax)
The validator will only verify 'http' urls.
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true if the url is valid; otherwise, false | static final boolean length | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
Compares the length of the attribute.
NSDictionary key/value pairs:
Operator=""
RightOperand=""
| object | object being validated. | |
| attribute | attribute being validated. | |
| key | key for attribute. | |
| params | extra parameters. Determines whether the specified string is of a specified length. (i.e. 'x' characters long) The required key-value pairs include: "Operator" = One of the defined operator constants. "RightOperand" = A number representing the number of characters one is interested. | |
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true if the comparison succeeds; otherwise, false | static final boolean maxLength | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
Determines whether the specified string is of a specified length. (i.e. 'x' characters long)
The required key-value pairs include:
"maxLength" = A number representing the number of characters one is interested.
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true if the comparison succeeds; otherwise, false | static final boolean minLength | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
Determines whether the specified string is of a specified length. (i.e. 'x' characters long)
The required key-value pairs include:
"minLength" = A number representing the number of characters one is interested.
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true if the comparison succeeds; otherwise, false | static final boolean startsWith | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
Verifies that the attribute starts with the specified string.
The required key-value pairs include:
"StartsWith" = The string of interest.
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true if the attribute starts with the specified string; otherwise, false | static final boolean stripHTML | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
One of the many 'mutators' which never fail, unless of course, an exception is thrown.
A mutator simply modifies (or mutates) the attribute is some way.
In this case, it strips any HTML out of the String.
HTML is considered anything (and including) '<' and '>'.
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true | static final boolean toLowerCase | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
One of the many 'mutators' which never fail, unless of course, an exception is thrown.
A mutator simply modifies (or mutates) the attribute is some way.
In this case, it converts the String to all lower case characters.
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true | static final boolean toUpperCase | ( | Object | object, | |
| Object | attribute, | |||
| String | key, | |||
| NSDictionary | params | |||
| ) | [static] |
One of the many 'mutators' which never fail, unless of course, an exception is thrown.
A mutator simply modifies (or mutates) the attribute in some way.
In this case, it converts the String to all upper case characters.
| object | The object whose attribute is being validated. | |
| attribute | The attribute being validated. | |
| key | The key used to access the attribute. | |
| params | The param dictionary which must contain the above mentioned key-value pairs. |
true
For programatic purposes, we include this constant which is used for the compareTo method.
final String GREATER_EQUAL = ">=" [static] |
For programatic purposes, we include this constant which is used for the compareTo method.
final String GREATER_THAN = ">" [static] |
For programatic purposes, we include this constant which is used for the compareTo method.
final String LESS_EQUAL = "<=" [static] |
For programatic purposes, we include this constant which is used for the compareTo method.
For programatic purposes, we include this constant which is used for the compareTo method.
For programatic purposes, we include this constant which is used for the compareTo method.
1.5.8