Static HostStatic OptionsStatic basicBasic validation - this is used to perform the validation provided by the
validation options only. If the validation options pass (e.g. required,
empty and optional) then the validation will pass regardless of the
actual value.
Configured validation function
Optional cfg: default = nullValidation options
Static booleanStatic dateCheck that a valid date input is given. Uses MomentJS
Configured validation function
MomentJS date format
Optional locale: string = nullMomentJS locale
Optional cfg: default = nullValidation options
Static dbCheck that the given value is unique in the database
Configured validation function
Optional cfg: default = nullValidation options
Optional column: string = nullColumn name to use to check as a unique value. If not given the host field's database column name is used
Optional table: string = nullTable to check that this value is uniquely valid on. If not given the host Editor's table name is used
Optional db: Knex<any, any[]> = nullDatabase connection. If not given the host Editor's database connection is used
Static dbCheck that the given value is a value that is available in a database -
i.e. a join primary key. This will attempt to automatically use the table
name and value column from the field's Options method (under the
assumption that it will typically be used with a joined field), but the
table and field can also be specified via the options.
Configured validation function
Optional cfg: default = nullValidation options
Optional column: string = nullColumn name to use to check as a unique value. If not given the host field's database column name is used
Optional table: string = nullTable to check that this value is uniquely valid on. If not given the host Editor's table name is used
Optional db: Knex<any, any[]> = nullDatabase connection. If not given the host Editor's database connection is used
Static emailStatic fileStatic fileStatic ipStatic maxStatic maxCheck for a numeric input and that it is less than a given value.
Configured validation function
Maximum value
Optional decimal: string = '.'Character to use as the decimal place
Optional cfg: default = nullValidation options
Static minStatic minRequire a string with a certain minimum or maximum number of characters.
Configured validation function
Minimum length
Maximum length
Optional cfg: default = nullValidation options
Static minCheck for a numeric input and that it is in between two given values.
Configured validation function
Minimum value
Maximum value
Optional decimal: string = '.'Character to use as the decimal place
Optional cfg: default = nullValidation options
Static minCheck for a numeric input and that it is greater than a given value.
Configured validation function
Minimum value
Optional decimal: string = '.'Character to use as the decimal place
Optional cfg: default = nullValidation options
Static mjoinStatic mjoinStatic noStatic noneStatic notStatic numericStatic requiredStatic urlStatic valuesStatic xssGenerated using TypeDoc
Validation methods for DataTables Editor fields. All of the methods defined in this class return a function that can be used by Field instance's Field.Validator method.
Each method may define its own parameters that configure how the formatter operates. For example the
minLenvalidator takes information on the minimum length of value to accept.Additionally each method can optionally take a
ValidationOptionsinstance that controls common validation options and error messages.The validation functions return
truefor valid data and a string for invalid data, with the string being the error message.Export