Wiki

Articles tagged with "validation"X
Displaying 1-9 of 9 result(s).

Safely checking if a model class exists (without exploding)

Created 17 days ago by BoazHow-tos0 comments – viewed 1,508 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.

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

Created 8 months ago by Ankit ModiTutorials2 comments – viewed 5,451 times – ( +2 )
1) include the fancybox extesion otherwise fancybox js

Debugging CActiveRecord failed save() attempts

Created 11 months ago by BoazTips0 comments – viewed 6,286 times – ( +4 ) – 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.

Client-side form validation using Twitter Bootstrap's Popovers

Created 11 months ago by TrejderHow-tos4 comments – viewed 24,396 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.

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

Created about a year ago by nlacTutorials3 comments – viewed 20,456 times – ( +5 ) – 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.

Working with radiobutton list

Created about a year ago by vibhaJadwaniTutorials1 comment – viewed 26,208 times – ( +9 ) – version 1.1
This is a tutorial to work with radioButtonList which will handle enum datatype. Form design and validation both are detailed here.

Understanding "Safe" Validation Rules

Created 3 years ago by Steve FriedlFAQs10 comments – viewed 63,380 times – ( +83 / -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.

Enforcing "You must agree" requirements in forms

Created 3 years ago by Steve FriedlHow-tos3 comments – viewed 14,075 times – ( +29 ) – version 1.1
Checkboxes have two possible values, true and false, but some applications require that the user select one particular value before proceeding. Examples might be:
tags: validation

Reference: Model rules validation

Created 4 years ago by krillzipHow-tos5 comments – viewed 430,210 times – ( +111 ) – 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.