Download the PHP package juststeveking/fluent-validation without Composer
On this page you can find all versions of the php package juststeveking/fluent-validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download juststeveking/fluent-validation
More information about juststeveking/fluent-validation
Files in juststeveking/fluent-validation
Package fluent-validation
Short Description Fluent Validation is a helper package, that allows you to use sensible defaults for your Laravel validation rules.`
License MIT
Informations about the package fluent-validation
Fluent Validation
Fluent Validation is a helper package, that allows you to use sensible defaults for your Laravel validation rules.
Installation
Why??
Why did I create this package? Well to be honest, I was feeling lazy - but a productive kind of lazy. I was writing some validation for quite a large API request and looked at all the string input I was about to have to validate, and thought there must be an easier way. So I created this to save me time by taking time building a package. I got the last laugh though, as now I never have to write the same string validation again!
Usage
To use this package all you need to do is include the rules you may wish to use:
Validating emails
Or to build them up yourself and/or override them:
Validating Passwords
Or to build them up yourself and/or override them:
Validating Strings
Or to build them up yourself and/or override them:
Available Fluency Rules
This is a list of the currently available Fluency Rules:
EmailRule
- Will returnrequired
andemail
rules.PasswordRule
- Will returnrequired
andPassword::default()
rules from Laravel.StringRule
- Will returnrequired
,min:2
, andmax:255
rules.
Available Rules
This is a list of the currently available Rules:
Accepted
- Will returnaccepted
or whatever override input you pass.After
- Will returnafter:
and whatever override input you pass.AfterOrEqual
- Will returnafter_or_equal:
and whatever override input you pass.Alpha
- Will returnalpha
or whatever override input you pass.Boolean
- Will returnboolean
or whatever override input you pass.Date
- Will returndate
or whatever override input you pass.Email
- Will returnemail:
and whatever override input you pass.Enum
- Will return a new Laravel Enum validation rule, you must pass a backed Enum to this instance usingYourEnum::class
.Exists
- Will returnexists:
with whatever table and an optional column you pass to it.Integer
- Will returninteger
or whatever override input you pass.Max
- Will returnmax:
and whatever override input you pass.Min
- Will returnmin:
and whatever override input you pass.Required
- Will returnrequired
or whatever override input you pass.Text
- Will returnstring
or whatever override input you pass.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Steve McDougall
- All Contributors
License
The MIT License (MIT). Please see License File for more information.