File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
user_guide_src/source/models Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -380,8 +380,11 @@ Cleans out the database table by permanently removing all rows that have 'delete
380
380
381
381
.. literalinclude :: model/026.php
382
382
383
+ In-Model Validation
384
+ ===================
385
+
383
386
Validating Data
384
- ===============
387
+ ---------------
385
388
386
389
For many people, validating data in the model is the preferred way to ensure the data is kept to a single
387
390
standard, without duplicating code. The Model class provides a way to automatically have all data validated
@@ -454,7 +457,7 @@ and simply set ``$validationRules`` to the name of the validation rule group you
454
457
.. literalinclude :: model/034.php
455
458
456
459
Retrieving Validation Rules
457
- ===========================
460
+ ---------------------------
458
461
459
462
You can retrieve a model's validation rules by accessing its ``validationRules ``
460
463
property:
@@ -473,7 +476,7 @@ value an array of fieldnames of interest:
473
476
.. literalinclude :: model/037.php
474
477
475
478
Validation Placeholders
476
- =======================
479
+ -----------------------
477
480
478
481
The model provides a simple method to replace parts of your rules based on data that's being passed into it. This
479
482
sounds fairly obscure but can be especially handy with the ``is_unique `` validation rule. Placeholders are simply
You can’t perform that action at this time.
0 commit comments