UNPKG

@ministryofjustice/hmpps-digital-prison-reporting-frontend

Version:

The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.

20 lines (19 loc) 568 B
import { RequestHandler } from 'express'; import { LoadType } from '../types/UserReports'; /** * Middleware to validate a report or dashboard filter request * * - creates a schema dynamically from the filter definitions * - checks the form data against it * - sets errors in req.flash if there are errors * - and redirects back to current page * * @param {*} req * @param {*} res * @param {*} next * @return {*} */ export declare const validateFilters: ({ interactive, loadType }: { interactive: boolean; loadType?: LoadType; }) => RequestHandler;