Laravel 5.7.15 Released on 28 november
New validation rule and Eloquent relationship getters are available in new laravel 5.7.15 — first, the starts_with validation rule which allows you to check that an input starts with a string.
$request->validate([
'greeting' => 'starts_with:hello',
]);
pass multiple strings, in which the rule will pass if at least one matches the input:
$request->validate([
'greeting' => 'starts_with:hello,hola',
]);
the date_equals validation rule is now translatable, and you should update your resources/lang/en/validation.php file with the following:
'date_equals' => 'The :attribute must be a date equal to :date.',
New relationship getters are available in this release including:
BelongsToMany::getParentKeyName
BelongsToMany::getRelatedKeyName
HasManyThrough::getFirstKeyName
HasManyThrough::getForeignKeyName
HasManyThrough::getSecondLocalKeyName
HasOneOrMany::getLocalKeyName
MorphToMany::getInverse
Added
Fixed
$request->validate([
'greeting' => 'starts_with:hello',
]);
pass multiple strings, in which the rule will pass if at least one matches the input:
$request->validate([
'greeting' => 'starts_with:hello,hola',
]);
the date_equals validation rule is now translatable, and you should update your resources/lang/en/validation.php file with the following:
'date_equals' => 'The :attribute must be a date equal to :date.',
New relationship getters are available in this release including:
BelongsToMany::getParentKeyName
BelongsToMany::getRelatedKeyName
HasManyThrough::getFirstKeyName
HasManyThrough::getForeignKeyName
HasManyThrough::getSecondLocalKeyName
HasOneOrMany::getLocalKeyName
MorphToMany::getInverse
Added
- Added date_equals validation message
- Added starts_with validation rule
- Added relationship getters BelongsToMany::getParentKeyName, BelongsToMany::getRelatedKeyName, HasManyThrough::getFirstKeyName, HasManyThrough::getForeignKeyName, HasManyThrough::getSecondLocalKeyName, HasOneOrMany::getLocalKeyName, MorphToMany::getInverse
- Make ResourceCollection countable
Fixed
- Fixed duplicate validation issue in FormRequest::validated method
- Prevent breaking eager loading with string keys
Comments
Post a Comment