UNPKG

react-browser-form

Version:

<div align="center"> <a href="https://deniskabana.github.io/react-browser-form/introduction" title="React Browser Form - Form management in React made simple for browsers."> <img src="https://raw.githubusercontent.com/deniskabana/react-browser-form/

10 lines (8 loc) 322 B
import { DEFAULT_VALIDATION_ERROR_MESSAGE } from "../constants"; /** Error to throw when form field validation fails */ export class ValidationError extends Error { constructor(message?: string) { super(message ?? DEFAULT_VALIDATION_ERROR_MESSAGE); Object.setPrototypeOf(this, ValidationError.prototype); } }