PASIprep Error Display Guidelines
Types of Errors
The errors shown in PASIprep can be divided into the following categories:
Validation rule or server errors
These are generally errors thrown by the services used by the screen when user performs an action or is attempting to view data on screen.
If there are errors on one or more records during a bulk operation, a summary error message would be shown in the panel with an Export link that'll allow user to download the details on the records that failed.
The summary message should show the number of successes and failures and provide an export link, e.g. “The save operation failed for 10 of 20 records. [Export] to view the details of the affected records.”
The export should trigger the download of a CSV containing:
Error Code (i.e. Validation Rule Number)
Error Message (i.e. Validation Rule Message)
{all columns that were visible on the grid where the user performed the bulk operation on}
{Last Column}
URL (to the View page that the user should go to to review the issue)
Field level validations are generally performed client side and is used to validate the data value's format and structure (e.g. accepted data type (date, int), formats (e.g. postal code formats), maximum lengths allowed).
They should be display below the field that triggered the error
-
Unexpected errors and failures
These are errors that results from user performing something unexpected or the server responded in an unexpected manner (e.g. database failure). These are scenarios where it is important not to expose data or allow user to perform an action, thus an
error page should be used
If the Error happens when user is performing an action that will take them away from the screen (e.g. submitting a form, where on success user would be redirected to a different page), and the error prevents user from advancing, they should remain on the page the action originated from, and the Error(s) should be displayed on that screen.
When to use Client Side vs Service Validation Errors
For PASIprep, any validation that is covered by a validation rule in the service should ideally not be repeated as client side validation. The goal is to reduce maintenance effort on keeping both server side and client side in sync.
Thus the following guidelines on the usage of client side vs service validation is recommended:
If a function uses a specific PASI Core Service that has (or will have) rejection validation rules implemented against it, unless there is a reason to do so, the UI should not try to replicate the rules defined in the service to predicatively 'hide' a function.
If the function does not use a Core Service, or an appropriate validation rule on the Core service doesn't exist (and is not appropriate to add to the Core Service), the expectation is that on the server side, either 1) there are service security restrictions implemented (preferred method is possible) or 2)
User Error type validation rules created to enforce the business rule required. This applies to all business rules related to
PASIprep Permission checks, as the Core Services cannot validate against those permissions. Note that User Error validation rules are preferred if either 1) a user-friendly message needs to be provided to the user as they can encounter the security restriction with 'normal usage' (i.e. they didn't try to 'hack' the
URL or screen to try to get to a function they shouldn't have), OR 2) the rule involves checking a PASIprep permission in conjunction with another data element (e.g. School Year), as service security restrictions cannot meet these two objectives.
Error Message Writing Guidelines