From b9f69e4d3a717fb63bf50dbbc765c1196fe6d3e3 Mon Sep 17 00:00:00 2001 From: Alex Booker Date: Fri, 14 Aug 2015 16:39:06 +0100 Subject: [PATCH] show error if no options are selected --- password.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/password.html b/password.html index 757a8043..2e67b6b5 100644 --- a/password.html +++ b/password.html @@ -80,6 +80,10 @@ }; function outputGeneratedPassword() { var password = passwordGenerator.generatePassword(getOptions()); + if (password === '') { + alert("Whops. You unselected all the options. I don't know what characters you want. Click on the button entitled \"Advanced Options\" and enable some options and thent try again. Nice one"); + return; + } $("#password-input").val(password); } $(function() {