Wiki

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

using 'whenClient' for complex client side validation

Created 3 months ago by thiagoc7How-tos0 comments – viewed 936 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

Created 3 months ago by Kartik VTips0 comments – viewed 1,384 times – ( +26 ) – 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.

Handling tabular data loading and validation in Yii 2

Created 3 months ago by Kartik VTutorials0 comments – viewed 2,074 times – ( +26 / -4 ) – 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.

Safely checking if a model class exists (without exploding)

Created 5 months ago by BoazHow-tos0 comments – viewed 3,074 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 about a year ago by Ankit ModiTutorials2 comments – viewed 7,168 times – ( +2 )
1) include the fancybox extesion otherwise fancybox js

Debugging CActiveRecord failed save() attempts

Created about a year ago by BoazTips0 comments – viewed 9,000 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 about a year ago by TrejderHow-tos4 comments – viewed 27,439 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 26,243 times – ( +5 / -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.

Working with radiobutton list

Created 2 years ago by vibhaJadwaniTutorials2 comments – viewed 31,433 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 71,359 times – ( +90 / -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.