unique-multiple-columns-validate Validates that a combination of attribute values is unique in the corresponding database table

  1. Documentation
  2. Change Log

This extension, takes a combination of Model attributes and verifies uniqueness of the combination in the database table.

Credit: I took the original code posted by me23 at this Forum topic and packaged it with minor modification to raise an error referencing the attribute combination and not a single attribute. Other than that, the credit it to the community.

Documentation

Requirements
  • Yii 1.0 or above
Installation
  • Extract the release file under protected/extensions
Usage

See the following code example:

public function rules()
{
	return array(
		....
		array('attribute1+attribute2+attribute3', 'application.extensions.uniqueMultiColumnValidator'),
		....

Change Log

October 23, 2009
13 1
15 followers
3 878 downloads
Yii Version: 1.1
License: (not set)
Category: Validation
Developed by: Khaled Afiouni
Created on: Oct 23, 2009
Last updated: 5 years ago

Downloads

show all

Related Extensions