mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:57:36 +08: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
|
@ -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 New Issue
Block a user