Laravel 3.2 DocumentationLaravel\Controller __construct. Rewrote Eloquent and included in core. Added "match" validation rule. Fixed table prefix bug. Added Form::macro method. Added HTML::macro method. Added contained in a list of values: 'language' => 'not_in:cobol,assembler' Confirmation The confirmed rule validates that, for a given attribute, a matching attribute_confirmation attribute exists. Validate attribute in the array being validated. Acceptance The accepted rule validates that an attribute is equal to yes or 1. This rule is helpful for validating checkbox form fields such as "terms of service"0 码力 | 139 页 | 1.13 MB | 1 年前3
Learning LaravelLaravel Introduction PHP Exceptions are thrown when an unprecedented event or error occurs. As a rule of thumb, an exception should not be used to control the application logic such as if- statements running validation rules on an attribute after the first validation failure. To do so, assign the bail rule to the attribute: https://riptutorial.com/ 187 $this->validate($request, [ 'name' => 'bail|required' Provider might be over the top, as of Laravel 5.4 you can create new rules fluently by using the Rule class. As an example we are going to work with the UserRequest for when you want to insert or update0 码力 | 216 页 | 1.58 MB | 1 年前3
Laravel 5.0 Documentation
the given min and max. Strings, numerics, and files are evaluated in the same fashion as the size rule. The field under validation must be able to be cast as a boolean. Accepted input are true , false the size rule. The file under validation must have a MIME type corresponding to one of the listed extensions. 'photo' => 'mimes:jpeg,bmp,png' exists:table,column Basic Usage Of Exists Rule Specifying bar,... Basic Usage Of MIME Rule The field under validation must have a minimum value. Strings, numerics, and files are evaluated in the same fashion as the size rule. The field under validation0 码力 | 242 页 | 1.44 MB | 1 年前3
Laravel 5.6 中文文档在新安装的 Laravel 应用中,该目录已经包含了一些服务提供者,你可以按需添加自己的服务提供者到该目录。 Rules 目录 该目录默认不存在,但是会伴随你执行 Artisan 命令 make:rule 自动生成。Rules 目录包含应用的自定义验证规则对象,这些规则用于在单个对象 中封装复杂的验证逻辑,想要了解更多的话,请参考验证文档。 Homestead 简介 Laravel ory Validator Illuminate\Contracts\Validation\ImplicitRule Illuminate\Contracts\Validation\Rule Illuminate\Contracts\Validation\ValidatesWhenResolved Illuminate\Contracts\Validation\Validator 'dimensions:ratio=3/2' 由于该规则要求多个参数,可以使用 Rule::dimensions 方法来构造该规则: use Illuminate\Validation\Rule; Validator::make($data, [ 'avatar' => [ 'required', Rule::dimensions()->maxWidth(10000 码力 | 377 页 | 14.56 MB | 1 年前3
Laravel 6.0 中文文档在新安装的 Laravel 应用中,该目录已经包含了一些服务提供者, 你可以按需添加自己的服务提供者到该目录。 Rules 目录 该目录默认不存在,但是会伴随你执行 Artisan 命令 make:rule 自 动生成。Rules 目录包含应用的自定义验证规则对象,这些规则用于 在单个对象中封装复杂的验证逻辑,想要了解更多的话,请参考验证 文档。 重 量 级 开 发 环 境 : Homestead \Factory Validator Illuminate\Contracts\Validation\ImplicitRule Illuminate\Contracts\Validation\Rule Illuminate\Contracts\Validation\ValidatesWhen Resolved Illuminate\Contracts\Validation\Validator 由于该规则要求多个参数,可以使用 Rule::dimensions 方法来构造 该规则: 本文档由学院君提供 学院君致力于提供优质 Laravel 中文学习资源:https://xueyuanjun.com 345 use Illuminate\Validation\Rule; Validator::make($data, [ 'avatar' => [ 'required', Rule::dimen0 码力 | 1442 页 | 14.66 MB | 1 年前3
The Laravel Handbook
Contents Preface The Laravel Handbook Conclusion 2 Preface The Laravel Handbook follows the 80/20 rule: learn in 20% of the time the 80% of a topic. In particular, the goal is to get you up to speed0 码力 | 111 页 | 14.25 MB | 1 年前3
Laravel 5.1 中文文档307 Validator::extend(...); Validator::replacer('foo', function($message, $attribute, $rule, $parameters) { return str_replace(...); }); } 更多 Laravel 中文学习资源,请访问 Laravel 学院!0 码力 | 307 页 | 3.46 MB | 1 年前3
Laravel 5.2 中文文档boot(){ Validator::extend(...); Validator::replacer('foo', function($message, $attribute, $rule, $parameters) { return str_replace(...); }); } 隐式扩展 默认情况下,被验证的属性如果没有提供或者验证规则为 required0 码力 | 377 页 | 4.56 MB | 1 年前3
共 8 条
- 1













