Mv class
// MAP VALIDATOR
// It is used to validate the data of a Map<String, dynamic>
// All input is required
Mv input = await Mv.validate(map, 'required.all');
// All input is required except phone and address
Mv input = await Mv.validate(map, 'required.all|phone,address');
// Set rule to specific input
Mv input = await Mv.validate(map, {
'name': 'required',
'email': 'required|email',
'phone': 'required|numeric|min:10|max:15',
});
// check result
bool ok = input.ok;
String? error = input.error;
Map<String, dynamic> result = input.result; // details
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited