Hi all!
I'm newbie to Zend framework and I've encountered one more problem:-/
So, I've read this tutorial:
_http://steven.macintyre.name/zend-framework-jquery-form-validation-plugins/
And I'm getting this error:
exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name
'ValidateText' was not found in the registry
As I understood I must use addPrefixPath function that element should know
which validator to use.
So, in this place I'm got in trouble - I don't know how to add prefix at
this code:
$this->setAction('/admin/registration/register')
->setMethod('post');
$this->setAttrib('name', 'register');
$this->addElement(
'validateText',
'username',
array(
'label' => 'Username',
'formId' => 'register',
'trim' => true,
'required' => true,
'validators' => array(
array(
'validator' =>
'StringLength',
'options' =>
array(5, 15)
)
),
'js' => array(
'minlength' => '5',
'maxlength' => '15',
'class' => 'required',
'remote' =>
'/user/ajax/checkuser/',
),
)
);
The dir tree looks like this:
library
--Ig
Form->Element->ValidateText.pgp
View
Helper->ValidateText.php
Thank you in advance!
--
View this message in context:
http://old.nabble.com/Troubles-with-Custom-Validation-plugin-tp26160618p26160618.html
Sent from the Zend Framework mailing list archive at Nabble.com.