Commit 77ab0de5 authored by Jacob Dufault's avatar Jacob Dufault Committed by Commit Bot

cros: Fix off-by-one error in PIN settings.

If pin length must be set then the error messages for

- [0,3] digits: "PIN must be at least 4 digits"
- [5..] digits: "PIN must be less than 4 digits"

The 5.. digit case should be "PIN must be less than 5 digits"

Bug: 855635
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: I840772182b292f150626aa670594221bd1096904
Reviewed-on: https://chromium-review.googlesource.com/1112210Reviewed-by: default avatarSammie Quon <sammiequon@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: Jacob Dufault <jdufault@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569724}
parent 8ef6bc5d
......@@ -173,7 +173,7 @@ Polymer({
additionalInformation = requirements.minLength.toString();
break;
case MessageType.TOO_LONG:
additionalInformation = requirements.maxLength.toString();
additionalInformation = (requirements.maxLength + 1).toString();
break;
case MessageType.TOO_WEAK:
case MessageType.MISMATCH:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment