Registration module in development state
This commit is contained in:
43
Http/Forms/RegistrationForm.php
Normal file
43
Http/Forms/RegistrationForm.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user