File tree Expand file tree Collapse file tree
user_guide_src/source/models Expand file tree Collapse file tree 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
380380
381381.. literalinclude :: model/026.php
382382
383+ In-Model Validation
384+ ===================
385+
383386Validating Data
384- ===============
387+ ---------------
385388
386389For many people, validating data in the model is the preferred way to ensure the data is kept to a single
387390standard, 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
454457.. literalinclude :: model/034.php
455458
456459Retrieving Validation Rules
457- ===========================
460+ ---------------------------
458461
459462You can retrieve a model's validation rules by accessing its ``validationRules ``
460463property:
@@ -473,7 +476,7 @@ value an array of fieldnames of interest:
473476.. literalinclude :: model/037.php
474477
475478Validation Placeholders
476- =======================
479+ -----------------------
477480
478481The model provides a simple method to replace parts of your rules based on data that's being passed into it. This
479482sounds 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