Form Subscription
- improved MailPoet ajax to fix token issue - added js validation and ajax submit in public.js - add util security to generate tokens - updated router to use new util security - added jquery-validation module - update public config in webpack config - added error messages in form
This commit is contained in:
@@ -10,16 +10,8 @@ class Subscriber extends Model {
|
||||
parent::__construct();
|
||||
|
||||
$this->addValidations('email', array(
|
||||
'required' => "email_is_blank",
|
||||
'isEmail' => "email_is_invalid"
|
||||
));
|
||||
$this->addValidations('first_name', array(
|
||||
'required' => "first_name_is_blank",
|
||||
"isString" => "name_is_not_string"
|
||||
));
|
||||
$this->addValidations('last_name', array(
|
||||
'required' => "last_name_is_blank",
|
||||
"isString" => "name_is_not_string"
|
||||
'required' => __('You need to enter your email address.'),
|
||||
'isEmail' => __('Your email address is invalid.')
|
||||
));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user