toJson method
Converts the ValidationErrorModel to a JSON object.
This method can be used when making HTTP requests to convert the validation error to a format that can be sent in the request.
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['message'] = message;
data['property'] = property;
return data;
}