UNPKG

@progress/kendo-react-form

Version:

React Form is a small and fast package for form state management with zero dependencies. KendoReact Form package

20 lines (19 loc) 881 B
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ /** * Validates a single field and returns an error message or success. * * * value - Contains the current field value * * valueGetter - Gets values from other fields using field paths like 'user.name' * * fieldProps - Contains the field's props, including the field name * * Returns a string for validation errors or undefined for successful validation. */ export type FieldValidatorType = (value: any, valueGetter: (name: string) => any, fieldProps: { name: string; }) => string | undefined;