Skip to content

Fluent Rules Reference

Below is the complete list of available fluent rule, grouped by rule precedence priority.

modifier -> circuit -> presence -> type -> constraint

Modifier

  • exclude()
  • excludeIf(string $field, mixed ...$values)
  • excludeUnless(string $field, mixed ...$values)
  • excludeWith(string $field)
  • excludeWithout(string $field)
  • nullable()
  • sometimes()

Circuit

  • bail()

Presence

  • accepted()
  • acceptedIf(string $field, mixed ...$values)
  • declined()
  • declinedIf(string $field, mixed ...$values)
  • filled()
  • missing()
  • missingIf(string $field, mixed ...$values)
  • missingUnless(string $field, mixed ...$values)
  • missingWith(string ...$fields)
  • missingWithAll(string ...$fields)
  • present()
  • presentIf(string $field, mixed ...$values)
  • presentUnless(string $field, mixed ...$values)
  • presentWith(string ...$fields)
  • presentWithAll(string ...$fields)
  • prohibited()
  • prohibitedIf(string $field, mixed ...$values)
  • prohibitedIfAccepted(string ...$fields)
  • prohibitedIfDeclined(string ...$fields)
  • prohibitedUnless(string $field, mixed ...$values)
  • prohibits(string ...$field)
  • required()
  • requiredArrayKeys(string ...$keys)
  • requiredIf(string $field, mixed ...$values)
  • requiredIfAccepted(string ...$fields)
  • requiredIfDeclined(string ...$fields)
  • requiredUnless(string $field, mixed ...$values)
  • requiredWith(string ...$fields)
  • requiredWithAll(string ...$fields)
  • requiredWithout(string ...$fields)
  • requiredWithoutAll(string ...$fields)

Type

  • array()
  • boolean(bool $strict = false)
  • file()
  • integer(bool $strict = false)
  • numeric()
  • string()

Constraint

  • activeUrl()
  • after(string $date)
  • afterOrEqual(string $date)
  • alpha(bool $ascii = false)
  • alphaDash(bool $ascii = false)
  • alphaNum(bool $ascii = false)
  • ascii()
  • before(string $date)
  • beforeOrEqual(string $date)
  • between(int $min, int $max)
  • confirmed(?string $field = null)
  • contains(mixed ...$values)
  • currentPassword()
  • date()
  • dateEquals(string $date)
  • dateFormat(string $format)
  • decimal(int $min, ?int $max = null)
  • different(string $field)
  • digits(int $value)
  • digitsBetween(int $min, int $max)
  • dimensions(array $constraints)
  • distinct(bool $strict = false, bool $ignoreCase = false)
  • doesntContain(mixed ...$values)
  • doesntEndWith(string ...$suffixes)
  • doesntStartWith(string ...$prefixes)
  • email(string ...$validators)
  • encoding(string $type)
  • endsWith(string ...$suffixes)
  • exists(string $table, string $column)
  • extensions(string ...$extensions)
  • gt(string $field)
  • gte(string $field)
  • hexColor()
  • image()
  • in(mixed ...$values)
  • inArray(string $field)
  • inArrayKeys(string ...$keys)
  • ip()
  • ipv4()
  • ipv6()
  • json()
  • list()
  • lowercase()
  • lt(string $field)
  • lte(string $field)
  • macAddress()
  • max(int $value)
  • maxDigits(int $value)
  • mimes(string ...$extensions)
  • mimetypes(string ...$types)
  • min(int $value)
  • minDigits(int $value)
  • multipleOf(int $value)
  • notIn(mixed ...$values)
  • notRegex(string $pattern)
  • regex(string $pattern)
  • same(string $field)
  • size(int $value)
  • startsWith(string ...$prefixes)
  • timezone()
  • ulid()
  • unique(string $table, string $column)
  • uppercase()
  • url(string ...$protocols)
  • uuid(?int $version = null)