You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.2 KiB
PHP

<?php
namespace Modules\Register\Http\Forms;
use Artmark\Forms\Form;
//use App\Models\User;
/**
* Description of RegistrationForm
*
* @author Andrey Pokidov <pokidov@e-traffic.ru>
*/
class RegistrationForm extends Form
{
const MINIMAL_PASSWORD_LENGTH = 6;
public function __construct()
{
$this->newEmail('email')->setId('email')
->setLabelText(__('register::register.email_field'))
->setRequired()
->setMaxLength(255);
$this->newText('phone')->setId('phone')
->setLabelText(__('register::register.phone_field'))
->setMaxLength(25);
$this->newPassword('password')->setId('password')
->setLabelText(__('register::register.password_field'))
->setRequired()
->setMaxLength(255);
$this->newPassword('password_confirm')->setId('password_confirm')
->setLabelText(__('register::register.password_confirm_field'))
->setRequired()
->setMaxLength(255);
$this->newCheckbox('agree')->setId('agree')
->setLabelText(__('register::register.agree'))
->setRequired();
}
}