setError
Sets validation errors for specific fields.
This function allows you to programmatically set validation errors for specific fields, typically used for server-side validation errors or custom validation scenarios. Errors are combined with existing field errors.
Usage:
formMetaState.setError(
"email" to FieldError("Email already exists"),
"username" to FieldError("Username is taken")
)
Content copied to clipboard
Parameters
pairs
Pairs of field names and their corresponding errors.