# Rules
- Accepted
- Accepted If
- Active URL
- after:date
- After Or Equal (Date)
- Alpha
- Alpha Dash
- Alpha Numeric
- Array
- Bail
- Before (Date)
- Before Or Equal (Date)
- Between
- Boolean
- Confirmed
- Current Password
- Date
- Date Equals
- Date Format
- Declined
- Declined If
- Different
- Digits
- Digits Between
- Dimensions (Image Files)
- Distinct
- Ends With
- Enum
- Exclude
- Exclude If
- Exclude Unless
- Exclude Without
- Exists (Database)
- File
- Filled
- Greater Than
- Greater Than Or Equal
- Image (File)
- In
- In Array
- Integer
- IP Address
- MAC Address
- JSON
- Less Than
- Less Than Or Equal
- Max
- MIME Types
- MIME Type By File Extension
- Min
- Multiple Of
- Not In
- Not Regex
- Nullable
- Numeric
- Password
- Present
- Prohibited
- Prohibited If
- Prohibited Unless
- Prohibits
- Regular Expression
- Required
- Required If
- Required Unless
- Required With
- Required With All
- Required Without
- Required Without All
- Same
- Size
- Sometimes
- Starts With
- String
- Timezone
- Unique (Database)
- URL
- UUID
# Accepted
# Accepted If
# Active URL
# after:date
# Example
'start_date' => 'required|date|after:tomorrow'
'finish_date' => 'required|date|after:start_date'
# After Or Equal (Date)
# Alpha
# Alpha Dash
# Alpha Numeric
# Array
# Bail
# Before (Date)
# Before Or Equal (Date)
# Between
# Boolean
# Confirmed
# Current Password
'password' => 'current_password:api'
# Date
# Date Equals
# Date Format
# Declined
# Declined If
# Different
# Digits
# Digits Between
# Dimensions (Image Files)
# Distinct
'email' => 'email:rfc,dns'
# Ends With
# Enum
# Exclude
# Exclude If
# Exclude Unless
# Exclude Without
# Exists (Database)
# File
# Filled
# Greater Than
# Greater Than Or Equal
# Image (File)
# In
'type' => 'in:DEFAULT,SOCIAL'
['required', Rule::in(['Expense','Income'])],
# In Array
# Integer
# IP Address
# MAC Address
# JSON
# Less Than
# Less Than Or Equal
# Max
# MIME Types
# MIME Type By File Extension
# Min
# Multiple Of
# Not In
# Not Regex
# Nullable
# Numeric
# Password
# Present
# Prohibited
# Prohibited If
# Prohibited Unless
# Prohibits
# Regular Expression
# Required
# Required If
# Required Unless
# Required With
# Required With All
# Required Without
# Required Without All
# Same
# Size
# Sometimes
# Starts With
# String
# Timezone
# Unique (Database)
'email' => 'unique:App\Models\User,email_address'
'email' => 'unique:users,email_address'
# Forcing A Unique Rule To Ignore A Given ID:
'email' => [
'required',
Rule::unique('users')->ignore($user->id),
],
'title' => ['required', 'max:255', Rule::unique('posts')->ignore($this->post)],
'slug' => ['required', 'max:255', Rule::unique('posts')->ignore($this->post)],
# Adding Additional Where Clauses:
'email' => Rule::unique('users')->where(function ($query) {
return $query->where('account_id', 1);
})
# URL
'url' => [
'required',
'url'
],
# UUID
← Form Request Enums →