foctal-validator allow only octal numbers

  1. Requirements
  2. Installation
  3. Usage
  4. Configuration parameters
  5. Resources

FOctalValidator verifies if the attribute represents a valid octal number.

Requirements

  • Yii 1.1.7 or above...
  • PHP 5.2.0 (PHP filter extension)

Installation

  • Extract the release file under protected/extensions/validators
  • Extract the message file under protected if you wish user messages in your language and translate the messages in your language.

Usage

In the model we use:

public function rules()
{
   return array(
      array('<attributeName>', 'ext.validators.FOctalValidator')
   )
}

Configuration parameters

Parameter Default value Comment
attributes list (array)) of attributes to be validated
message the user-defined error message
skipOnError false whether this validation rule should be skipped if when there is already a validation error for the current attribute
on List of scenarios that the validator should be applied. Each array value refers to a scenario name with the same name as its array key.
safe true whether attributes listed with this validator should be considered safe for massive assignment
enableClientValidation   true whether to perform client-side validation
allowEmpty true whether the attribute value can be null or empty

Resources

1 0
1 follower
491 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Validation
Developed by: volkmar
Created on: Nov 7, 2011
Last updated: 13 years ago

Downloads

show all

Related Extensions