@formkit/rules
Version:
Validation rules for FormKit
267 lines (228 loc) • 7.62 kB
text/typescript
import { FormKitValidationRule } from '@formkit/validation';
/**
* Determine if the given input's value was should be considered "accepted".
* @param context - The FormKitValidationContext
* @public
*/
declare const accepted: FormKitValidationRule;
/**
* Determine if the given input's value is after a given date.
* Defaults to current time.
* @param context - The FormKitValidationContext
* @public
*/
declare const date_after: FormKitValidationRule;
/**
* Determine if the given input's value is after or equal to a given date.
* Defaults to current time.
* @param context - The FormKitValidationContext
* @public
*/
declare const date_after_or_equal: FormKitValidationRule;
/**
* Determine if the given input's value is after a given date.
* Defaults to current time.
* @param context - The FormKitValidationContext
* @public
*/
declare const date_after_node: FormKitValidationRule;
/**
* Determine if the given input's value contains only alpha characters.
* @param context - The FormKitValidationContext
* @public
*/
declare const alpha: FormKitValidationRule;
/**
* Determine if the given input's value contains only alpha characters or space.
* @param context - The FormKitValidationContext
* @public
*/
declare const alpha_spaces: FormKitValidationRule;
/**
* Determine if the given input's value contains only alpha or numeric characters.
* @param context - The FormKitValidationContext
* @public
*/
declare const alphanumeric: FormKitValidationRule;
/**
* Determine if the given input's value is before a given date.
* @param context - The FormKitValidationContext
* @public
*/
declare const date_before: FormKitValidationRule;
/**
* Determine if the given input's value is before a given date.
* Defaults to current time.
* @param context - The FormKitValidationContext
* @public
*/
declare const date_before_node: FormKitValidationRule;
/**
* Determine if the given input's value is before or equal to a given date.
* @param context - The FormKitValidationContext
* @public
*/
declare const date_before_or_equal: FormKitValidationRule;
/**
* Determine if the given input's value is between two other values.
* @param context - The FormKitValidationContext
* @public
*/
declare const between: FormKitValidationRule;
/**
* Determine if the given input's value matches another input's value.
* @param context - The FormKitValidationContext
* @public
*/
declare const confirm: FormKitValidationRule;
/**
* Determine if the given input's value contains alpha characters.
* @param context - The FormKitValidationContext
* @public
*/
declare const contains_alpha: FormKitValidationRule;
/**
* Determine if the given input's value contains alpha characters or space.
* @param context - The FormKitValidationContext
* @public
*/
declare const contains_alpha_spaces: FormKitValidationRule;
/**
* Determine if the given input's value contains alpha or numeric characters.
* @param context - The FormKitValidationContext
* @public
*/
declare const contains_alphanumeric: FormKitValidationRule;
/**
* Determine if the given input's value contains lowercase characters.
* @param context - The FormKitValidationContext
* @public
*/
declare const contains_lowercase: FormKitValidationRule;
/**
* Determine if the given input's value contains numeric characters.
* @param context - The FormKitValidationContext
* @public
*/
declare const contains_numeric: FormKitValidationRule;
/**
* Determine if the given input's value contains symbol characters.
* @param context - The FormKitValidationContext
* @public
*/
declare const contains_symbol: FormKitValidationRule;
/**
* Determine if the given input's value contains uppercase characters.
* @param context - The FormKitValidationContext
* @public
*/
declare const contains_uppercase: FormKitValidationRule;
/**
* Determine if the given input's value is between two other dates.
* @param context - The FormKitValidationContext
* @public
*/
declare const date_between: FormKitValidationRule;
/**
* Determine if the given input's value matches a specified date format.
* @param context - The FormKitValidationContext
* @public
*/
declare const date_format: FormKitValidationRule;
/**
* Determine if the given input's value is a plausible email address.
* @param context - The FormKitValidationContext
* @public
*/
declare const email: FormKitValidationRule;
/**
* Determine if the given input's value ends with a given string.
* @param context - The FormKitValidationContext
* @public
*/
declare const ends_with: FormKitValidationRule;
/**
* Determine if the given input's value is in a set of possible values.
* @param context - The FormKitValidationContext
* @public
*/
declare const is: FormKitValidationRule;
/**
* Determine if the given input's value length is full width.
* @param context - The FormKitValidationContext
* @public
*/
declare const length: FormKitValidationRule;
/**
* Determine if the given input's value contains only lowercase characters.
* @param context - The FormKitValidationContext
* @public
*/
declare const lowercase: FormKitValidationRule;
/**
* Determine if the given input's value matches one or more values or regular expressions.
* @param context - The FormKitValidationContext
* @public
*/
declare const matches: FormKitValidationRule;
/**
* Determine if the given input's value is less than or equal to the maximum.
* @param context - The FormKitValidationContext
* @public
*/
declare const max: FormKitValidationRule;
/**
* Determine if the given input's value is greater than or equal to the minimum.
* @param context - The FormKitValidationContext
* @public
*/
declare const min: FormKitValidationRule;
/**
* Determine if the given input's value is not in a given stack.
* @param context - The FormKitValidationContext
* @public
*/
declare const not: FormKitValidationRule;
/**
* Determine if the given input's value is numeric.
* @param context - The FormKitValidationContext
* @public
*/
declare const number: FormKitValidationRule;
/**
* Determine if any of the given inputs have a value.
* @param context - The FormKitValidationContext
* @public
*/
declare const require_one: FormKitValidationRule;
/**
* Determine if the given input's value is required.
* @param context - The FormKitValidationContext
* @public
*/
declare const required: FormKitValidationRule;
/**
* Determine if the given input's value starts with a substring.
* @param context - The FormKitValidationContext
* @public
*/
declare const starts_with: FormKitValidationRule;
/**
* Determine if the given input's value contains only symbol characters.
* @param context - The FormKitValidationContext
* @public
*/
declare const symbol: FormKitValidationRule;
/**
* Determine if the given input's value contains only uppercase characters.
* @param context - The FormKitValidationContext
* @public
*/
declare const uppercase: FormKitValidationRule;
/**
* Determine if the given input's value is a URL.
* @param context - The FormKitValidationContext
* @public
*/
declare const url: FormKitValidationRule;
export { accepted, alpha, alpha_spaces, alphanumeric, between, confirm, contains_alpha, contains_alpha_spaces, contains_alphanumeric, contains_lowercase, contains_numeric, contains_symbol, contains_uppercase, date_after, date_after_node, date_after_or_equal, date_before, date_before_node, date_before_or_equal, date_between, date_format, email, ends_with, is, length, lowercase, matches, max, min, not, number, require_one, required, starts_with, symbol, uppercase, url };