GValidate class abstract
Pattern-RegExp: http://goo.gl/jxPnU3
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
exclusiveBetween(
Comparable start, Comparable end, Comparable value, [String message = DEFAULT_EXCLUSIVE_BETWEEN_EX_MESSAGE]) → void - Validate that the specified argument object fall between the two exclusive values specified; otherwise, throws an exception.
-
inclusiveBetween(
Comparable start, Comparable end, Comparable value, [String message = DEFAULT_INCLUSIVE_BETWEEN_EX_MESSAGE]) → void - Validate that the specified argument object fall between the two inclusive values specified; otherwise, throws an exception.
-
isAlphaNumeric(
String input, [String message = DEFAULT_MATCHES_PATTERN_EX]) → void -
isEmail(
String input, [String message = DEFAULT_MATCHES_PATTERN_EX]) → void -
isHex(
String input, [String message = DEFAULT_MATCHES_PATTERN_EX]) → void -
isInstance(
instanceCheck instanceCheck, dynamic obj, [String message = DEFAULT_IS_INSTANCE_OF_EX_MESSAGE]) → void - Validate that the argument is an instance of the specified class; otherwise throwing an exception. This method is useful when validating according to an arbitrary class
-
isJson(
dynamic value, [String message = DEFAULT_JSON_MESSAGE]) → void - Validate that the specified value ist either a num, String, bool, Map or List. If the first check fails isJson checks if the value has a toJson() function - if so, the value is also valid
-
isKeyInMap(
dynamic key, Map map, [String message = DEFAULT_KEY_IN_MAP_MESSAGE]) → void - Validate that the specified key is in the map and if so the value is not null. If %key% is found in [message] it will be replaced with [key].toString()
-
isPassword(
String input, [String message = DEFAULT_MATCHES_PATTERN_EX]) → void -
isTrue(
bool expression, [String message = DEFAULT_IS_TRUE_EX_MESSAGE]) → bool - Validate that the argument condition is [true] otherwise throwing an exception with the specified message. This method is useful when validating according to an arbitrary boolean expression, such as validating a primitive number or using your own custom validation expression.
-
isUUID(
String input, [String message = DEFAULT_MATCHES_PATTERN_EX]) → void -
matchesPattern(
String input, RegExp pattern, [String message = DEFAULT_MATCHES_PATTERN_EX]) → void - Validate that the specified argument character sequence matches the specified regular expression pattern; otherwise throwing an exception.
-
noNullElements(
Iterable iterable, [String message = DEFAULT_NO_NULL_ELEMENTS_ARRAY_EX_MESSAGE]) → Iterable - Validate that the specified argument array is neither [null] nor contains any elements that are [null]; otherwise throwing an exception with the specified message.
-
notBlank(
String value, [String message = DEFAULT_NOT_BLANK_EX_MESSAGE]) → String - Validate that the specified string is neither [null], a length of zero (no characters), empty nor whitespace; otherwise throwing an exception with the specified message.
-
notEmpty(
dynamic value, [String message = DEFAULT_NOT_EMPTY_MESSAGE]) → dynamic - Validate that the specified argument is neither [null] nor is empty (object must have isEmpty implemented); otherwise throwing an exception with the specified message.
-
notNull<
T> (T object, [String message = DEFAULT_IS_NULL_EX_MESSAGE]) → T - Validate that the specified argument is not [null]; otherwise throwing an exception.
-
validIndex(
Iterable iterable, int index, [String message = DEFAULT_VALID_INDEX_ARRAY_EX_MESSAGE]) → Iterable - Validates that the index is within the bounds of the argument iterable; otherwise throwing an exception with the specified message.
-
validState(
bool expression, [String message = DEFAULT_VALID_STATE_EX_MESSAGE]) → void - Validate that the stateful condition is [true] otherwise throwing an exception. This method is useful when validating according to an arbitrary boolean expression, such as validating a primitive number or using your own custom validation expression.
Constants
- DEFAULT_EXCLUSIVE_BETWEEN_EX_MESSAGE → const String
- DEFAULT_INCLUSIVE_BETWEEN_EX_MESSAGE → const String
- DEFAULT_IS_INSTANCE_OF_EX_MESSAGE → const String
- DEFAULT_IS_NULL_EX_MESSAGE → const String
- DEFAULT_IS_TRUE_EX_MESSAGE → const String
- DEFAULT_JSON_MESSAGE → const String
- DEFAULT_KEY_IN_MAP_MESSAGE → const String
- DEFAULT_MATCHES_PATTERN_EX → const String
- DEFAULT_NO_NULL_ELEMENTS_ARRAY_EX_MESSAGE → const String
- DEFAULT_NOT_BLANK_EX_MESSAGE → const String
- DEFAULT_NOT_EMPTY_MESSAGE → const String
- DEFAULT_VALID_INDEX_ARRAY_EX_MESSAGE → const String
- DEFAULT_VALID_STATE_EX_MESSAGE → const String
- PATTERN_ALPHANUMERIC → const String
- PATTERN_EMAIL → const String
- PATTERN_HEX → const String
- PATTERN_PW → const String
- PATTERN_UUID → const String