ValidationRule

JSON representation
{

  // Union field rule can be only one of the following:
  "intRange": {
    object (IntRange)
  },
  "doubleRange": {
    object (DoubleRange)
  },
  "stringRegex": {
    object (StringRegex)
  }
  // End of list of possible types for union field rule.
}
Fields

Union field rule.

rule can be only one of the following:

intRange

object (IntRange)

doubleRange

object (DoubleRange)

stringRegex

object (StringRegex)

IntRange

Range used to validate longs and ints.

JSON representation
{
  "min": string,
  "max": string
}
Fields
min

string (int64 format)

The inclusive minimum of the acceptable range.

max

string (int64 format)

The inclusive maximum of the acceptable range.

DoubleRange

Range used to validate doubles and floats.

JSON representation
{
  "min": number,
  "max": number
}
Fields
min

number

The inclusive minimum of the acceptable range.

max

number

The inclusive maximum of the acceptable range.

StringRegex

Rule used to validate strings.

JSON representation
{
  "regex": string,
  "exclusive": boolean
}
Fields
regex

string

The regex applied to the input value(s).

exclusive

boolean

Whether the regex matcher is applied exclusively (if true, matching values will be rejected).