The team of Laravel has released all-new v5.8.33 in the month of August. These new versions have new capabilities added to the email validation rule that include the latest changes and some of the fixes.
Let’s have a look at the changes :
- From requests a user can now provide a passedValidation() callback that will fire once the validation has passed:
public function passedValidation()
$this->replace(['name' => 'Adam']);
- These passedValidation callbacks can be helpful for applying filters to data without intrusive with validation.
- The new type of email validation support has been implemented by Dries Vints using the egulias/EmailValidator package.
- When checking for valid emails, the improved email validation rule acquaints the ability to add multiple email validators.
'email' => 'email:rfc,dns'
By referring to the latest laravel validation documentation for 5.8 you can get to know about the new parameters possible in the email validation rule. The possible rules include strict, spoof, dns, and rfc filter.
Another support added by Dries Vints is for Redis 5.0 in a backward-compatible way so that all can support v5.0 in starting in this release.
For MySQL and Postgres ‘insert ignore’ support was added and to learn it in detail you need to check out add insert ignore support on GitHub.
Ignore works during an insert that means if the database runs into errors, it generally terminates and doesn’t insert any rows. While with ignore, the database will ignore invalid data and insert valid rows.
The amazing last feature that is added is the ability to use the custom, Whoops Handler. For more details, you can check on GitHub.
Have A Look On Whole Difference Between 5.8.32 and 5.8.33 as per on GitHub:
- Implement new types for email validation support
- Added ValidatesWhenResolvedTrait::passedValidation() callback
- Allowed to override the existing Whoops handler
- Added Redis 5 support
- Added insert or ignore support
- Avoid undefined index errors when using AWS IAM
- Fixed exception message in the ProviderRepository::writeManifest()
- Fixed command testing of output and questions expectations
- Added ignoring of classes which are not instantiable during event discovery
- Fixed non-displayable boolean values invalidation messages
- Used real class name for seeders in the output
- Fixed invalid link expiry count in ResetPassword
- Simplified isset()
Get in touch with Concetto Lab to get the best applications and reshape your business today.