Interface SchemaInternals

interface SchemaInternals {
    $_super: Schema<any>;
    $_terms: Record<string, any>;
    $_addRule(rule): Schema<any>;
    $_compile(schema, options?): Schema<any>;
    $_createError(code, value, context, state, prefs, options?): Err;
    $_getFlag(name): any;
    $_getRule(name): undefined | GetRuleOptions;
    $_mapLabels(path): string;
    $_match(value, state, prefs): boolean;
    $_modify(options?): Schema<any>;
    $_mutateRebuild(): SchemaInternals;
    $_mutateRegister(schema, options?): void;
    $_property(name): any;
    $_reach(path): Schema<any>;
    $_rootReferences(): any;
    $_setFlag(flag, value, options?): void;
    $_validate(value, state, prefs): ValidationResult<any>;
}

Hierarchy

Properties

$_super: Schema<any>

Parent schema object.

$_terms: Record<string, any>

Terms of current schema.

Methods

  • Adds a rule to current validation schema.

    Parameters

    • rule: string | AddRuleOptions

    Returns Schema<any>

  • Internally compiles schema.

    Parameters

    • schema: SchemaLike
    • Optional options: CompileOptions

    Returns Schema<any>

  • Creates a joi error object.

    Parameters

    • code: string
    • value: any
    • context: Context
    • state: State
    • prefs: ValidationOptions
    • Optional options: CreateErrorOptions

    Returns Err

  • Get value from given flag.

    Parameters

    • name: string

    Returns any

  • Retrieve some rule configuration.

    Parameters

    • name: string

    Returns undefined | GetRuleOptions

  • Parameters

    • path: string | string[]

    Returns string

  • Returns true if validations runs fine on given value.

    Parameters

    • value: any
    • state: State
    • prefs: ValidationOptions

    Returns boolean

  • Parameters

    • Optional options: ModifyOptions

    Returns Schema<any>

  • Parameters

    • schema: Schema<any>
    • Optional options: MutateRegisterOptions

    Returns void

  • Get value from given property.

    Parameters

    • name: string

    Returns any

  • Get schema at given path.

    Parameters

    • path: string[]

    Returns Schema<any>

  • Get current schema root references.

    Returns any

  • Set flag to given value.

    Parameters

    • flag: string
    • value: any
    • Optional options: SetFlagOptions

    Returns void

  • Runs internal validations against given value.

    Parameters

    • value: any
    • state: State
    • prefs: ValidationOptions

    Returns ValidationResult<any>

Generated using TypeDoc