ncc-prototype-email-alerts-sub
Version:
Northumberland Council Front End Email Alerts Subscription Prototype
11 lines (8 loc) • 587 B
text/typescript
import { ValidationRule} from "../types/controller";
import {emailValidator, postCodeValidator, selectddlValidator} from '../libs/formValidators'
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const formValidationRules: ValidationRule<any>[] = [
{ fieldNames: ['postcode'], validate: postCodeValidator, message: 'Please enter a UK Postcode'},
{ fieldNames: ['address'], validate: selectddlValidator, message: 'Please select an address from list'},
{ fieldNames: ['email'], validate: emailValidator, message: 'Please enter a valid email address'}
]