propel-validator
[ class tree: propel-validator ] [ index: propel-validator ] [ all elements ]

Class: NotMatchValidator

Source Location: /validator/NotMatchValidator.php

Class Overview


A validator for regular expressions.


Author(s):

Version:

  • $Revision: 521 $

Implements interfaces:

Methods



Class Details

[line 49]
A validator for regular expressions.

This validator will return true, when the passed value does *not* match the regular expression.

If you do want to test if the value *matches* an expression, you can use the MatchValidator class instead.

Below is an example usage for your Propel xml schema file.

  1.    <column name="ISBN" type="VARCHAR" size="20" required="true" />
  2.    <validator column="username">
  3.      <!-- disallow everything thats not a digit or minus -->
  4.      <rule
  5.        name="notMatch"
  6.        value="/[^\d-]+/"
  7.        message="Please enter a valid email adress." />
  8.    </validator>




Tags:

author:  Hans Lellelid <hans@xmpl.org>
author:  Michael Aichler <aichler@mediacluster.de>
version:  $Revision: 521 $


[ Top ]


Class Methods


method isValid [line 73]

void isValid( $map, $str)

Whether the passed string matches regular expression.



Tags:

access:  public



Implementation of:
BasicValidator::isValid()
Determine whether a value meets the criteria specified

Parameters:

ValidatorMap   $map  
   $str  

[ Top ]


Documentation generated on Thu, 22 Nov 2007 03:33:47 +0000 by phpDocumentor 1.4.0