Remove older password length check
Now that we have a fancier password complexity check, remove the older minimum length to avoid the feeling of two password style guides fighting each other.
This commit is contained in:
parent
4f41161a47
commit
a20d23daf3
3 changed files with 0 additions and 15 deletions
|
@ -28,8 +28,6 @@ import SdkConfig from '../../../SdkConfig';
|
||||||
import { messageForResourceLimitError } from '../../../utils/ErrorUtils';
|
import { messageForResourceLimitError } from '../../../utils/ErrorUtils';
|
||||||
import * as ServerType from '../../views/auth/ServerTypeSelector';
|
import * as ServerType from '../../views/auth/ServerTypeSelector';
|
||||||
|
|
||||||
const MIN_PASSWORD_LENGTH = 6;
|
|
||||||
|
|
||||||
// Phases
|
// Phases
|
||||||
// Show controls to configure server details
|
// Show controls to configure server details
|
||||||
const PHASE_SERVER_DETAILS = 0;
|
const PHASE_SERVER_DETAILS = 0;
|
||||||
|
@ -482,7 +480,6 @@ module.exports = React.createClass({
|
||||||
defaultPhoneCountry={this.state.formVals.phoneCountry}
|
defaultPhoneCountry={this.state.formVals.phoneCountry}
|
||||||
defaultPhoneNumber={this.state.formVals.phoneNumber}
|
defaultPhoneNumber={this.state.formVals.phoneNumber}
|
||||||
defaultPassword={this.state.formVals.password}
|
defaultPassword={this.state.formVals.password}
|
||||||
minPasswordLength={MIN_PASSWORD_LENGTH}
|
|
||||||
onRegisterClick={this.onFormSubmit}
|
onRegisterClick={this.onFormSubmit}
|
||||||
onEditServerDetailsClick={onEditServerDetailsClick}
|
onEditServerDetailsClick={onEditServerDetailsClick}
|
||||||
flows={this.state.flows}
|
flows={this.state.flows}
|
||||||
|
|
|
@ -48,7 +48,6 @@ module.exports = React.createClass({
|
||||||
defaultPhoneNumber: PropTypes.string,
|
defaultPhoneNumber: PropTypes.string,
|
||||||
defaultUsername: PropTypes.string,
|
defaultUsername: PropTypes.string,
|
||||||
defaultPassword: PropTypes.string,
|
defaultPassword: PropTypes.string,
|
||||||
minPasswordLength: PropTypes.number,
|
|
||||||
onRegisterClick: PropTypes.func.isRequired, // onRegisterClick(Object) => ?Promise
|
onRegisterClick: PropTypes.func.isRequired, // onRegisterClick(Object) => ?Promise
|
||||||
onEditServerDetailsClick: PropTypes.func,
|
onEditServerDetailsClick: PropTypes.func,
|
||||||
flows: PropTypes.arrayOf(PropTypes.object).isRequired,
|
flows: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
|
@ -61,7 +60,6 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
getDefaultProps: function() {
|
getDefaultProps: function() {
|
||||||
return {
|
return {
|
||||||
minPasswordLength: 6,
|
|
||||||
onValidationChange: console.error,
|
onValidationChange: console.error,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -256,15 +254,6 @@ module.exports = React.createClass({
|
||||||
test: ({ value, allowEmpty }) => allowEmpty || !!value,
|
test: ({ value, allowEmpty }) => allowEmpty || !!value,
|
||||||
invalid: () => _t("Enter password"),
|
invalid: () => _t("Enter password"),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: "minLength",
|
|
||||||
test: function({ value }) {
|
|
||||||
return !value || value.length >= this.props.minPasswordLength;
|
|
||||||
},
|
|
||||||
invalid: function() {
|
|
||||||
return _t("Too short (min %(length)s)", { length: this.props.minPasswordLength });
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: "complexity",
|
key: "complexity",
|
||||||
test: async function({ value }) {
|
test: async function({ value }) {
|
||||||
|
|
|
@ -1326,7 +1326,6 @@
|
||||||
"Enter email address (required on this homeserver)": "Enter email address (required on this homeserver)",
|
"Enter email address (required on this homeserver)": "Enter email address (required on this homeserver)",
|
||||||
"Doesn't look like a valid email address": "Doesn't look like a valid email address",
|
"Doesn't look like a valid email address": "Doesn't look like a valid email address",
|
||||||
"Enter password": "Enter password",
|
"Enter password": "Enter password",
|
||||||
"Too short (min %(length)s)": "Too short (min %(length)s)",
|
|
||||||
"Nice, strong password!": "Nice, strong password!",
|
"Nice, strong password!": "Nice, strong password!",
|
||||||
"Keep going...": "Keep going...",
|
"Keep going...": "Keep going...",
|
||||||
"Passwords don't match": "Passwords don't match",
|
"Passwords don't match": "Passwords don't match",
|
||||||
|
|
Loading…
Reference in a new issue