NyValidator provides an easy way to validate data.
You can use this method like in the example below:
try {
NyValidator.check(rules: {
"email": "email|max:20",
"name": "min:10"
}, data: {
"email": _textEditingEmailController.text,
"name": _textEditingNameController.text
});