Issue #36
new
How can I check the name and the E-Mail-Adress whether they are filled?
Comments (3)
-
repo owner -
You added validation, thanks.
But:
if (Settings::get('require_name_email', false) && $this->userId === 0) { $rules['name'] = 'required'; $rules['email'] = 'required|email'; $messages['name'] = 'xeor.comments::lang.messages.name'; $messages['email'] = 'xeor.comments::lang.messages.email'; }
should be after
$this->userId = $this->page['userId'] = Helper::getUserId();
otherwise
$this->userId === 0
return false.am I right?
-
and in the same file components/Comments.php
'mail' => post('mail', null),
should be
'email' => post('mail', null),
- Log in to comment
Hello! You can use jQuery Validation Plugin. I will add validation very soon.