Skip to content

Ability to customise messages #26

Open

Description

@djehring

Is it possible to customise the message. The message 'Getting better. (4/4 required though)' is causing some cognitive confusion with users as they see the 4/4 and can't understand why their password isn't accepted. Our support desk is getting a number of calls

Activity

  1. MorrisJobke commented on Mar 20, 2019

    @MorrisJobke
    Member

    Currently I don't actively develop this. So the current options are what is supported. Sorry

  2. sinasalek commented on Jun 5, 2019

    @sinasalek

    The following patch adds second parameter input (input element instance) to onResult
    Also adds a new callback alterResult(result, input) for altering result
    #29

    alterResult: function (result, input) {
    	if (result.password.length < 6) {
    		result.score = 0
    		// result.feedback.suggestions = ['Please enter at least 6 characters.']
    		result.feedback.suggestions = []
    	}
    	if (result.password.length > 32) {
    		result.score = 0
    		// result.feedback.suggestions = ['Please enter no more than 32 characters.']
    		result.feedback.suggestions = []
    	}
    
    	return result
    }
    
    
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions