json static method
FormFieldValidator that requires the field's value to be valid JSON.
Parameters:
errorText
The error message when the JSON is invalid.checkNullOrEmpty
Whether to check for null or empty values.
Implementation
static FormFieldValidator<String> json({
String? errorText,
bool checkNullOrEmpty = true,
}) => JsonValidator(
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;