<?php

/**
 * Nviatico form base class.
 *
 * @package    form
 * @subpackage nviatico
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseNviaticoForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'viaticoa'    => new sfWidgetFormInput(),
      'viaticob'    => new sfWidgetFormInput(),
      'tipo_tarifa' => new sfWidgetFormInput(),
      'rango1'      => new sfWidgetFormInput(),
      'rango2'      => new sfWidgetFormInput(),
      'estado'      => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorPropelChoice(array('model' => 'Nviatico', 'column' => 'id', 'required' => false)),
      'viaticoa'    => new sfValidatorNumber(array('required' => false)),
      'viaticob'    => new sfValidatorNumber(array('required' => false)),
      'tipo_tarifa' => new sfValidatorNumber(array('required' => false)),
      'rango1'      => new sfValidatorNumber(array('required' => false)),
      'rango2'      => new sfValidatorNumber(array('required' => false)),
      'estado'      => new sfValidatorNumber(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('nviatico[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Nviatico';
  }


}
