Architecture
Form validation
Simplified form validation with Backstack's built-in system.
The API validates all incoming form data and returns an actionable user type error if any values are missing or invalid.
{
"success": false,
"message": "Required values are missing",
"data": {
"error": {
"type": "user",
"fields": {
"username": "Required value",
"password": "Cannot be your username"
}
}
}
}
The error.fields
array contains field names and their associated error messages.
The message
provides details to help the user resolve the issue.