export interface BaseValidator { /** * Type of the validator */ readonly type: Type; /** * The full path of the property */ readonly path: string; /** * The rules to be used for validation */ readonly rules: Rules; /** * Check if the value is not valid * * @param {unknown} value - the value to be validated * * @returns {string|null} * if there's an error, return a string message * if there's no error, return null */ validate: (value: unknown) => string | null; }