validate static method
dynamic
validate(
- String state, {
- required Map<
String, dynamic> rules, - Map<
String, dynamic> ? data, - Map<
String, dynamic> ? messages, - bool showAlert = true,
- Duration? alertDuration,
- ToastNotificationStyleType alertStyle = ToastNotificationStyleType.warning,
- required dynamic onSuccess()?,
- dynamic onFailure(
- Exception exception
- String? lockRelease,
Validate data from your widget.
Implementation
static validate(String state,
{required Map<String, dynamic> rules,
Map<String, dynamic>? data,
Map<String, dynamic>? messages,
bool showAlert = true,
Duration? alertDuration,
ToastNotificationStyleType alertStyle =
ToastNotificationStyleType.warning,
required Function()? onSuccess,
Function(Exception exception)? onFailure,
String? lockRelease}) {
_updateState(state, "validate", {
"rules": rules,
"data": data,
"messages": messages,
"showAlert": showAlert,
"alertDuration": alertDuration,
"alertStyle": alertStyle,
"onSuccess": onSuccess,
"onFailure": onFailure,
"lockRelease": lockRelease,
});
}