hi all,
I working on symfony 1.1 and i want to move post validation errors in
input row format,
i looking several times in sfWidgetFormSchemaFormatter but i can't
found any solution,
here my divFormatter
class sfWidgetFormSchemaFormatterDiv extends sfWidgetFormSchemaFormatter {
protected
$rowFormat = '<div
class="field-container">%error%%label%%field%%help%</div>',
$helpFormat = '<span class="help">%help%</span>',
$errorRowFormat = '%errors%',
$errorListFormatInARow = '%errors%',
$errorRowFormatInARow = '<div class="formError">%error%</div>',
$namedErrorRowFormatInARow = '%name%: %error%<br />',
$decoratorFormat = '<div id="formContainer">%content%</div>';
}
here my postValidator defination in registerForm object
$this->getValidatorSchema()->
setPostValidator(
new sfValidatorAnd(
array(
'password' => new sfValidatorSchemaCompare(
'password', sfValidatorSchemaCompare::EQUAL, 'confirm',
array(),
array('invalid' => 'Password not confirmed')
),
'email' => new sfValidatorPropelUnique(array('model'
=> 'User', 'column' => 'email'),
array('invalid'=>__('email adres already in use,
if you forget password click %1%',
array('%1%'=>link_to(__('here'), '@forget'))))
),
'username' => new
sfValidatorPropelUnique(array('model' => 'User', 'column' =>
'username'), array(
'invalid'=>__('Username already taken, chouse another one')
)
)
)
)
);
i expected like that
<div>
<div>field error </div>
<label></label>
<input />
<span>helper</span>
<div>postvalidator messages for this field (username exp)</div>
</div>
i get like that
<div>postvalidator messages (username exp)</div>
<div>
<div>field error </div>
<label></label>
<input />
<span>helper</span>
</div>
--
Saygılar && İyi Çalışmalar
Timu EREN ( a.k.a selam )
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---