Rule
[ class tree: Rule ] [ index: Rule ] [ all elements ]

Class: Formagic_Rule_Mandatory

Source Location: /Rule/Mandatory.php

Class Overview

Formagic_Rule_Abstract
   |
   --Formagic_Rule_Mandatory

Checks if value is given


Author(s):

  • Florian Sonnenburg

Version:

  • $Id: Mandatory.php 126 2011-05-18 18:41:58Z meweasle $

Copyright:

  • Copyright (c) 2007-2009 Florian Sonnenburg

Variables

Methods


Inherited Variables

Inherited Methods

Class: Formagic_Rule_Abstract

Formagic_Rule_Abstract::__construct()
Constructor
Formagic_Rule_Abstract::getMessage()
Returns translated error message of rule
Formagic_Rule_Abstract::getName()
Returns rule type identification string.
Formagic_Rule_Abstract::setMessage()
Sets the error message property.
Formagic_Rule_Abstract::validate()
Abstract of main validate method. Returns boolean value of check success.
Formagic_Rule_Abstract::_init()
Allows subclass initialization.

Class Details

[line 37]
Checks if value is given



Tags:

author:  Florian Sonnenburg
version:  $Id: Mandatory.php 126 2011-05-18 18:41:58Z meweasle $
copyright:  Copyright (c) 2007-2009 Florian Sonnenburg
license:  New BSD License


[ Top ]


Class Variables

$_message =  'Please enter a value'

[line 43]

Default message



Tags:

access:  protected

Type:   string
Overrides:   Array


[ Top ]



Class Methods


method validate [line 53]

boolean validate( string $value)

Performs rule check

Mandatory rule checks if value is given.




Tags:

return:  True if the item has a value
access:  public


Overrides Formagic_Rule_Abstract::validate() (Abstract of main validate method. Returns boolean value of check success.)

Parameters:

string   $value   Item value to be checked

[ Top ]


Documentation generated on Sun, 22 May 2011 22:40:17 +0200 by phpDocumentor 1.4.3