Wiki articles tagged with "validation"

Showing 1-12 of 12 items.

using 'whenClient' for complex client side validation

Created 7 years ago by thiagoc7, updated 7 years ago by thiagoc7.

You have a 'Category' model with Id, Name and Visibility (boolean, where 0 = Public, and 1 = Private).

0 0
3 followers
Viewed: 17 535 times
Version: 2.0
Category: How-tos

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

Created 7 years ago by Kartik V, updated 7 years ago by Kartik V.

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.

0 0
37 followers
Viewed: 23 835 times
Version: 2.0
Category: Tips

Handling tabular data loading and validation in Yii 2

Created 7 years ago by Kartik V, updated 5 years ago by Said Bakr.

The only differences in Yii 2 is that its much simpler due to available functions in the Model class for loading and validating models.

3 2
51 followers
Viewed: 53 572 times
Version: 2.0
Category: Tutorials

Safely checking if a model class exists (without exploding)

Created 7 years ago by Boaz, updated 7 years ago by CeBe.

While rewriting the PcReportContent extension I'm maintaining I've bumped to a challenge. This wiki was born out of it.

1 0
2 followers
Viewed: 14 078 times
Version: 1.1
Category: How-tos

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

Created 8 years ago by Ankit Modi, updated 7 years ago by Rohit Suthar.

1) include the fancybox extesion otherwise fancybox js

0 0
4 followers
Viewed: 16 556 times
Version: 1.1
Category: Tutorials

Debugging CActiveRecord failed save() attempts

Created 8 years ago by Boaz, updated 7 years ago by Boaz.

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.

4 0
2 followers
Viewed: 35 049 times
Version: 1.1
Category: Tips

Client-side form validation using Twitter Bootstrap's Popovers

Created 8 years ago by Trejder, updated 8 years ago by Trejder.

This article explains how to easily turn standard text-line validation errors into beautifully and professionally looking Twitter Bootstrap's Popovers.

4 0
9 followers
Viewed: 42 176 times
Version: 1.1
Category: How-tos

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

Created 8 years ago by nlac, updated 7 years ago by nlac.

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.

4 1
11 followers
Viewed: 58 772 times
Version: 1.1
Category: Tutorials

Working with radiobutton list

Created 9 years ago by vibhaJadwani, updated 9 years ago by vibhaJadwani.

This is a tutorial to work with radioButtonList which will handle enum datatype. Form design and validation both are detailed here.

9 0
10 followers
Viewed: 76 832 times
Version: 1.1
Category: Tutorials

Understanding "Safe" Validation Rules

Created 10 years ago by Steve Friedl, updated 8 years ago by Gismo.

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.

74 0
46 followers
Viewed: 164 187 times
Version: 1.1
Category: FAQs

Enforcing "You must agree" requirements in forms

Created 10 years ago by Steve Friedl, updated 10 years ago by Steve Friedl.

Checkboxes have two possible values, true and false, but some applications require that the user select one particular value before proceeding. Examples might be:

25 0
17 followers
Viewed: 30 972 times
Version: 1.1
Category: How-tos

Reference: Model rules validation

Created 11 years ago by krillzip, updated 8 years ago by Rodrigo.

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.

99 0
114 followers
Viewed: 853 868 times
Version: 1.1
Category: How-tos