Class ValidationRulesBridge

Bridge che si occupa di trasformare le regole di validazione di Laravel in regole per rc-form.

Questo ci permette di definirle con lo stesso formato.

Hierarchy

  • ValidationRulesBridge

Index

Constructors

constructor

Properties

formValue

formValue: FormValueGetter

rules

rules: __type

schema

Methods

Protected buildRuleForField

  • buildRuleForField(descriptors: string): any[]

Protected buildRules

  • buildRules(): void

Protected mapRuleToValidator

  • mapRuleToValidator(descriptor: string): object | object | object | object | object
  • Converte un singolo descrittore di validazione nel formato di Laravel in quello corrispondente di async-validator.

    Le regole che non sono disponibili vengono scartate con un warning. Questo in realtà, anche se scomodo per l'utente finale, non è un errore in quanto il Server restituirà comunque l'errore.

    Parameters

    • descriptor: string

      Il descrittore completo, ad esempio min:10 o required

    Returns object | object | object | object | object

Static forField

  • forField(descriptors: string | null | undefined, formValue: FormValueGetter): any[]

Static with

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc