<?php
/**
 * class auth_code_form
 *
 * Description for class auth_code_form
 *
 * @author:
*/
namespace form;

use core\form;

class auth_code_form extends form {
	public $code = "";

	public function init() {
		$this->addElement("code", array("required"));
	}

	public function valid() {
		if(!$this->send) {
			return false;
		}

		$valid = true;

		$this->code = $this->getElement("code")->getValue();
		if(empty($this->code)) {
			$this->elements["code"]->setError("Pole wymagane");
			$valid = false;
		}
		
		return $valid;
	}
}
?>