import { Field, FieldValidation } from '../../../../types';
import { GetLabelType } from '@m4l/core';
import { YupFieldSchema } from '../../../applyRequiredValidation/types';
/**
 * Context passed to each validation strategy when applying a validation rule.
 */
export interface ValidationStrategyContext {
    field: Field;
    getLabel: GetLabelType;
    baseSchema: YupFieldSchema;
    schema: YupFieldSchema;
    validation: FieldValidation;
}
/**
 * Strategy for applying a single validation type (e.g. required, max_length) to a Yup schema.
 * Each implementation handles one validation type id and returns the schema with that validation applied.
 */
export interface ValidationStrategy {
    /** Validation type id from the API (e.g. 'fvl_required', 'fvl_max_length'). */
    readonly validationTypeId: string;
    /**
     * Applies this validation to the current schema.
     * Returns the schema (possibly modified); may return the same schema if the validation does not apply.
     */
    apply(ctx: ValidationStrategyContext): YupFieldSchema;
}
//# sourceMappingURL=types.d.ts.map