This guide will show you how to display errors in various situations for WorkSafeBC Apps
When the error happens at the input-field level, use this style
Field | Message | Condition |
---|---|---|
Account number | Please enter a 6- or 9-digit account number | User leaves the WorkSafeBC account number field blank |
Claim number | Please enter your 8-digit claim number | User leaves the claim number field blank |
Email address | Please enter your email address in the format name@email.com | User leaves the email address field blank or does not follow the correct email format |
First name | Please enter your first name | User leaves the first name field blank. |
First name | Your first name must contain X characters | ... |
Phone number | Please enter a 10-digit phone number | Please enter a 10-digit phone number |
When a user is required to provide a combination of fields in order to continue, and their combination is incorrect, we display back a red blockquote
Claim not found
Thee information you've entered does not match a claim on file. Please try again
Application-level errors (e.g., we’re unable to display any of the user’s information) are displayed using our Alert styling.
Within an application, if a user searches or filters for something and it returns to results, we display a yellow blockquote
No [INSERT WHAT THEY WERE SEARCHING FOR] match the criteria you specified.
Upload errors are handled at the front end level as much as possible immediatelly after the error is detected.