react-ocean-forms
Version:
Forms components for react based on the context api.
15 lines (14 loc) • 524 B
TypeScript
/**
* Copyright (c) 2018-present, Umweltbundesamt GmbH
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { IFieldErrorObject, TFieldError } from '../validators';
/**
* Parses the validation error and returns either
* a validation object or undefined
* @param name field name
* @param error error message
*/
export declare const parseValidationError: (name: string, error: TFieldError) => IFieldErrorObject | null;