Fixes #907: unnecessary validation error
This commit is contained in:
parent
4da4131003
commit
734991f1ce
|
@ -4,6 +4,7 @@
|
|||
|
||||
### Bugfixes
|
||||
- Various IE11 fixes.
|
||||
- #907 Unnecessary login validation error when `default_domain` or `locked_domain` are set.
|
||||
- #908 Login form for inVerse is only 200px when `allow_registration` is set to `false`.
|
||||
- #909 Translations written as template literals [aren't parsed properly by xgettext](https://savannah.gnu.org/bugs/?50920).
|
||||
- #911 Use `getDefaultNickName` consistently to allow better overrides via plugins.
|
||||
|
|
|
@ -405,6 +405,8 @@
|
|||
},
|
||||
|
||||
authenticate (ev) {
|
||||
/* Authenticate the user based on a form submission event.
|
||||
*/
|
||||
if (ev && ev.preventDefault) { ev.preventDefault(); }
|
||||
const $form = $(ev.target);
|
||||
if (_converse.authentication === _converse.ANONYMOUS) {
|
||||
|
@ -418,10 +420,14 @@
|
|||
let jid = $jid_input.val(),
|
||||
errors = false;
|
||||
|
||||
if (!jid || _.filter(jid.split('@')).length < 2) {
|
||||
if (!jid || (
|
||||
!_converse.locked_domain &&
|
||||
!_converse.default_domain &&
|
||||
_.filter(jid.split('@')).length < 2)) {
|
||||
errors = true;
|
||||
$jid_input.addClass('error');
|
||||
}
|
||||
|
||||
if (!password && _converse.authentication !== _converse.EXTERNAL) {
|
||||
errors = true;
|
||||
$pw_input.addClass('error');
|
||||
|
|
Loading…
Reference in New Issue
Block a user