From 6c96591cb12ab96dc867a492705216d8ad0dc547 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Mon, 19 Sep 2016 14:47:02 +0300 Subject: [PATCH] password validation in !keypair command, closes #238 Former-commit-id: 9b8f0796069b3e3e66d2f28b063bdcda078fd9eb --- resources/console.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/resources/console.js b/resources/console.js index 8ad84af690..eeaae40b28 100644 --- a/resources/console.js +++ b/resources/console.js @@ -1,4 +1,3 @@ - var phones = [ { number: "89171111111", @@ -186,6 +185,18 @@ status.response({ params: [params.value] }; }, + validator: function (params) { + if(!params.value || params.value.length < 6){ + return { + errors: [ + status.components.validationMessage( + "Password", + "Password should be not less then 6 symbols." + ) + ] + }; + } + }, preview: function (params) { return status.components.text( {