From 9fdc1fac73708d289b54eada86e636c2b99c9c91 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 17 Oct 2020 22:16:02 +0530 Subject: [PATCH] Adds better validation messages --- utils/validations.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/validations.js b/utils/validations.js index cb8943692..4d0444816 100644 --- a/utils/validations.js +++ b/utils/validations.js @@ -16,7 +16,7 @@ const validateARecord = key => and([ const validateDomainData = validate({ name: { - reason: 'The name of the file is invalid', + reason: 'The name of the file is invalid. It must be lowercased, alphanumeric and more than 2 characters long', fn: or([ R.equals('@'), and([ @@ -28,7 +28,7 @@ const validateDomainData = validate({ description: { reason: '', fn: R.T, }, repo: { reason: '', fn: R.T, }, owner: { - reason: '`owner` needs username and email properties', + reason: '`owner` needs valid username and email properties', fn: and([ R.is(Object), R.complement(R.isEmpty),