How to use the @wireapp/commons.ValidationUtil.getNewPasswordPattern function in @wireapp/commons

To help you get started, we’ve selected a few @wireapp/commons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wireapp / wire-webapp / src / script / view_model / AuthViewModel.js View on Github external
_validatePassword(password) {
    return new RegExp(ValidationUtil.getNewPasswordPattern(this.minPasswordLength)).test(password);
  }
github wireapp / wire-webapp / src / script / auth / component / AccountForm.tsx View on Github external
data-uie-name="enter-email"
          />
          <input name="password">) =&gt; {
              inputs.password.current.setCustomValidity('');
              setRegistrationData({...registrationData, password: event.target.value});
              setValidInputs({...validInputs, password: true});
            }}
            ref={inputs.password}
            markInvalid={!validInputs.password}
            value={registrationData.password}
            autoComplete="section-create-team new-password"
            type="password"
            placeholder={_(accountFormStrings.passwordPlaceholder)}
            pattern={ValidationUtil.getNewPasswordPattern(Config.NEW_PASSWORD_MINIMUM_LENGTH)}
            required
            data-uie-name="enter-password"
          /&gt;
        
        <small data-uie-name="element-password-help" style="{{">
          {_(accountFormStrings.passwordHelp, {minPasswordLength: Config.NEW_PASSWORD_MINIMUM_LENGTH})}
        </small>
        {parseError(props.authError)}
        <div data-uie-name="error-message">{parseValidationErrors(validationErrors)}</div>