Skip to main content

defaultValidator()

defaultValidator(query): boolean | ValidationMap

This is an example validation function you can pass to QueryBuilder in the validator prop. It assumes that you want to validate groups, and has a no-op for validating rules which you can replace with your own implementation.

Parameters

ParameterType
queryRuleGroupTypeAny

Returns

boolean | ValidationMap

Defined in

packages/react-querybuilder/src/utils/defaultValidator.ts:15


caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.