RebbVal
EN
EN
  • Getting Started
  • Overview
  • Concepts
  • List of rules
    • Age
    • Array
    • Boolean
    • Comparions
    • Composite
    • Datetime
    • Identifications
    • Internet
    • Localization
    • String
Powered by GitBook
On this page
  • Equal
  • Start with
  • Ends with
  • In
  • Contains
  • Not empty
  • Max length
  • Percentage
  • Base64
  • Number
  • Int
  • Float
  • Hex number
  • Hex Color
  • Phone
  • Mobile
  • Match regex

Was this helpful?

  1. List of rules

String

All rules in this page can be applies to string

Equal

v.val("This string", "='This string'"); // true

Start with

Validates the input starts with the specified string in rule.

v.val("This string", "starts with 'This'"); // true

Ends with

Validates the input ends with the specified string in rule.

v.val("This string", "ends with 'string'"); // true

In

Validates the input is contained by the specified string in rule.

v.val("string", "in 'a longer string that contains it'"); // true

Contains

Validates the input contains specified string in rule.

v.val("This is a longer string that", "contains 'longer'"); // true

Not empty

Validates the input is not empty.

v.val("A string that is", "not empty"); // true

Max length

Validates the length of the input is not exceed the max length.

v.val("A string that ", "max length 15"); // true

Percentage

Validates the input is number in percentage format.

v.val("99%", "is percentage"); // true

Base64

v.val("UmViYlZhbCBydWxlcw==", "is base64"); // true

Number

Validates the input is a valid number format string

v.val("-1.23", "is number"); // true

Int

Validates the input is a valid integer format string

v.val("8888", "is int"); // true

Float

Validates the input is a valid float format string

v.val("3.1415926", "is float"); // true

Hex number

Validates the input is a valid hex number format string

v.val("0x123def", "is hex number"); // true

Hex Color

Validates the input is a vallid hex color format string

v.val("#FFEEDD", "is hex color");

Phone

Validates the input is a vallid phone number in P.R.C

v.val("021-59595959", "is phone");

Mobile

Validates the input is a vallid mobile phone number in P.R.C

v.val("13800138000", "is mobile");

Match regex

Validate the input matches user defined regex

v.val("13800138000", "match //d+/"); match a regex
PreviousLocalization

Last updated 4 years ago

Was this helpful?

Validates the input is a valid string

base64