UNPKG

ngx-vest-forms

Version:

Opinionated template-driven forms library for Angular

16 lines (15 loc) 607 B
/** * Clean error that improves the DX when making typo's in the `name` or `ngModelGroup` attributes */ export declare class ShapeMismatchError extends Error { constructor(errorList: string[]); } /** * Validates a form value against a shape * When there is something in the form value that is not in the shape, throw an error * This is how we throw runtime errors in develop when the developer has made a typo in the `name` or `ngModelGroup` * attributes. * @param formVal * @param shape */ export declare function validateShape(formVal: Record<string, any>, shape: Record<string, any>): void;