<?php

class cashOutForm extends BaseForm
{
    public function configure()
    {
        $this->widgetSchema['card'] = new sfWidgetFormInputText(array(), array('size' => 20, 'placeholder' => 'Номер карты', 'required' => true, 'autocomplete' => 'off', 'autofocus' => 'on'));
        $this->validatorSchema['card'] = new sfValidatorAnd(array(
            new sfValidatorString(array('min_length' => 13)),
            new sfValidatorRegex(array('pattern' => '/^[0-9]*$/'), array('invalid' => 'Неверный формат')),
        ));
        $this->useFields(array('card'));
        $this->widgetSchema->setNameFormat('out[%s]');
    }

    public function isValid()
    {
        $is_valid = parent::isValid();

        return $is_valid;
    }
}
