Fixed! Thanks to some help I figured out that it was a problem with the
expression. I changed the expression to:
/^[-'A-Za-z]+$/
and it seems to be working.
benxmy wrote:
>
> So I'm still having some failure on this, maybe related to my limited
> understanding of regex in general or perhap
So I'm still having some failure on this, maybe related to my limited
understanding of regex in general or perhaps my limited understanding of the
zend validator regex class.
If I were to program my own little validator, the following would work fine:
if( preg_match("/[^a-z\' -]/i","valid8") )
I'm sorry, I should have included in my previous post that I tried that while
playing around with it, but if I take the "^" out of the expression it
returns 'true' as soon as it hits an applicable character that matches the
expression, so if I input a string such as "Gravit8" it will return true (
-- benxmy wrote
(on Thursday, 05 February 2009, 12:20 PM -0800):
>
> So I figured it out to an extent, but I think I'm still one step off and I
> haven't been able to track down the exact syntax for using regex in this
> context. I changed the $_validators array to:
>
>
> protected $
So I figured it out to an extent, but I think I'm still one step off and I
haven't been able to track down the exact syntax for using regex in this
context. I changed the $_validators array to:
protected $_validators =
'lname' => array(array('Regex','/[^a-z\'-]/i'))
-- benxmy wrote
(on Tuesday, 03 February 2009, 11:27 AM -0800):
>
> Still not quite there. I believe I may be using Zend_Filter_Input
> incorrectly. I made the changes to my $_validators array as described and
> now it throws the following exception
>
> Fatal error: Uncaught exception 'Zend_Lo
Still not quite there. I believe I may be using Zend_Filter_Input
incorrectly. I made the changes to my $_validators array as described and
now it throws the following exception
Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with
message 'Plugin by name 1 was not found in
-- benxmy wrote
(on Monday, 02 February 2009, 01:58 PM -0800):
> That said, I'd prefer to use the ZF standard message
> when possible. Even if it worked, I'd be outta luck with a (') passing
> validation. Do you know if the following syntax is correct for the regex
> validator:
>
> protected $
The more I dig around and play with it, the more I think it may be a small ZF
bug.
Basically, I couldn't figure out what was happening, so I had the update
function just print out the result of the validation:
**
public function update(array $data, $where) {
$valid = $th
Hmm,
When you say "screetching to a halt", what actually happens? Is an exception
thrown? The validators will return true or false, and filters will returned
the filtered content.
On Mon, Feb 2, 2009 at 2:00 PM, benxmy wrote:
>
> Get the same failure with Alnum. I thought maybe using the buil
Get the same failure with Alnum. I thought maybe using the built-in Regex
validation class might work, so i've altered the $_validators array to look
like this:
***
protected $_validators = array(
'field1' => array('regex',true,array('/[^a-zA-Z\'\-\ ]/')),
Hi,
Did you try adding filtering with Alnum?
On Mon, Feb 2, 2009 at 10:13 AM, benxmy wrote:
>
> Hi,
> I'm pretty new to ZF, but I've searched around quite a bit to try and find
> a
> solution for this and thus far failed and I was hoping someone here could
> point me in the right direction.
>
>
Hi,
I'm pretty new to ZF, but I've searched around quite a bit to try and find a
solution for this and thus far failed and I was hoping someone here could
point me in the right direction.
I'm creating a class that extends the Zend_Db_Table_Abstract class which
will be a parent class to all our m
13 matches
Mail list logo