mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
name field: remove failure for blank name, and don't say your name looks good when you haven't entered anything
This commit is contained in:
parent
62a6b3ce19
commit
62fa3775f2
1 changed files with 2 additions and 9 deletions
|
@ -70,20 +70,13 @@ export default DiscourseController.extend(ModalFunctionality, {
|
|||
return I18n.t('user.password.instructions', {count: Discourse.SiteSettings.min_password_length});
|
||||
}.property(),
|
||||
|
||||
// Validate the name
|
||||
// Validate the name. It's not required.
|
||||
nameValidation: function() {
|
||||
// If blank, fail without a reason
|
||||
if (this.blank('accountName')) return Discourse.InputValidation.create({ failed: true });
|
||||
|
||||
if (this.get('accountPasswordConfirm') === 0) {
|
||||
this.fetchConfirmationValue();
|
||||
}
|
||||
|
||||
// Looks good!
|
||||
return Discourse.InputValidation.create({
|
||||
ok: true,
|
||||
reason: I18n.t('user.name.ok')
|
||||
});
|
||||
return Discourse.InputValidation.create({ok: true});
|
||||
}.property('accountName'),
|
||||
|
||||
// Check the email address
|
||||
|
|
Loading…
Reference in a new issue