validate method
void
validate({
- 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
void validate(
{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}) {
updatePageState("validate", {
"rules": rules,
"data": data,
"messages": messages,
"showAlert": showAlert,
"alertDuration": alertDuration,
"alertStyle": alertStyle,
"onSuccess": onSuccess,
"onFailure": onFailure,
"lockRelease": lockRelease,
});
}