AllowedMimeTypesRule class
A validation rule that checks if the file's MIME type is allowed.
This rule is used to ensure that the MIME type of the file being validated is one of the allowed types specified in the options.
- Inheritance
-
- Object
- ValidationRule
- AllowedMimeTypesRule
Constructors
Properties
-
contextValues
→ Map<
String, dynamic> ? -
Provide the values from the data to the rule, null if none
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The name of the validation rule.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
message(
dynamic value, [List< String> ? options]) → String -
The error message to be displayed if validation fails.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
dynamic value, [List< String> ? options]) → bool -
Validates whether the file's MIME type is allowed.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited