Wiki

Articles tagged with "validation", sorted by date (updated)X
Displaying 1-10 of 12 result(s).

Handling tabular data loading and validation in Yii 2

Updated 5 months ago by Said BakrTutorials6 comments – viewed 28,401 times – ( +43 / -6 ) – version 2.0
How do you read and handle tabular data submission via form in Yii framework 2.0? Sometimes we want to collect user input in a batch mode. That is, the user can enter the information for multiple model instances and submit them all at once. We call this tabular input because the input fields are often presented in an HTML table.

How to display page on fancybox...using CHtml::ajaxlink with yii validation

Updated about a year ago by Rohit SutharTutorials2 comments – viewed 11,240 times – ( +2 ) – version 1.1
1) include the fancybox extesion otherwise fancybox js

A simple way to get Yii client-side form validation run when submitting by ajax

Updated about a year ago by nlacTutorials5 comments – viewed 44,070 times – ( +8 / -2 ) – version 1.1
A time ago i've met the issue that Yii doesn't run any client-side form validation when submitting the form by CHtml::ajaxSubmitButton. The small javascript below helps to fix it.

using 'whenClient' for complex client side validation

Updated 2 years ago by thiagoc7How-tos0 comments – viewed 2,909 times – version 2.0
You have a 'Category' model with Id, Name and Visibility (boolean, where 0 = Public, and 1 = Private).

Model validation for field ranges using yii2-field-range extension

Updated 2 years ago by Kartik VTips0 comments – viewed 10,405 times – ( +39 ) – version 2.0
The yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.

Debugging CActiveRecord failed save() attempts

Updated 2 years ago by BoazTips0 comments – viewed 19,107 times – ( +5 ) – version 1.1
When you're filling up a form of a CActiveRecord (using CActiveForm for example), usually you'll construct your code so that in case of validation error you'll get back the form with the error displayed back to you, typically when CActiveForm.errorSummary() is used. This is how its done by Gii.

Safely checking if a model class exists (without exploding)

Updated 2 years ago by CeBeHow-tos0 comments – viewed 6,750 times – ( +1 ) – version 1.1
While rewriting the PcReportContent extension I'm maintaining I've bumped to a challenge. This wiki was born out of it.

Reference: Model rules validation

Updated 2 years ago by RodrigoHow-tos7 comments – viewed 674,866 times – ( +125 ) – version 1.1
This is a reference to be used for Model rule validation and is compiled from the Yii documentation and code. The purpose is to have all the information gathered in one place instead of scattered. This reference is not an intro. See The Definitive Guide to Yii, Declaring Validation Rules for a tutorial.

Client-side form validation using Twitter Bootstrap's Popovers

Updated 3 years ago by TrejderHow-tos4 comments – viewed 35,151 times – ( +4 / -1 ) – version 1.1
This article explains how to easily turn standard text-line validation errors into beautifully and professionally looking Twitter Bootstrap's Popovers.

Understanding "Safe" Validation Rules

Updated 3 years ago by GismoFAQs11 comments – viewed 107,680 times – ( +93 / -1 ) – version 1.1
A common source of confusion among new Yii users is how the 'safe' validator works, how it works with other validators, and why it's necessary in the first place. This article means to clear up this confusion, as well as explain the notion of Massive Assignment.