Adds better validation messages

This commit is contained in:
Akshay Nair
2020-10-17 22:16:02 +05:30
parent 194e4700c6
commit 9fdc1fac73
+2 -2
View File
@@ -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),