import type { IExecutor , IExecutorHandlersCollection } from '@cloudbeaver/core-executor' ; import { useExecutor } from './useExecutor' ; export function useFormValidator ( validationTask , ref , callback ? ) { useExecutor ( { executor : validationTask , postHandlers : [ function validate ( ) { ref . current ?. focus ( ) ; ref . current ?. checkValidity ( ) ; ref . current ?. reportValidity ( ) ; callback ?. ( ) ; } ] , } ) ; }