StringType class
The type specification of String types
- Inheritance
-
- Object
- AbstractType<
String, StringType> - StringType
Constructors
- StringType.new()
- Create a new StringType
Properties
Methods
-
baseType<
V> (Type type) → void -
inherited
-
check(
dynamic object, ValidationContext context) → void -
inherited
-
code(
) → String -
inherited
-
constraint(
String input) → StringType -
override
-
isValid(
dynamic object) → bool -
return
true
, if the specified object is valid, elsefalse
object
the to be validated object.inherited -
maxLength(
int length) → StringType - requires the value to have maximum length
-
minLength(
int length) → StringType - requires the value to hava minimum length
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notEmpty(
) → StringType - requires the value to be non empty
-
optional(
) → StringType -
inherited
-
parse(
Map< String, MethodSpec> methods, String expression) → StringType -
inherited
-
re(
String re, {String? message}) → StringType -
requires the value to match a regular expression
re
the regular expression -
required(
) → StringType -
inherited
-
test<
S> ({required Type type, required String name, required Check< S> check, dynamic params = const <String, dynamic>{}, dynamic stop = false, String? message}) → StringType -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
dynamic object) → void -
validate the passed object. In case of a type violation, a ValidationException will be thrown
object
the to be validated object.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
methods
→ Map<
String, MethodSpec> -
final
Static Methods
-
fromString(
String input) → StringType