mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-12 12:13:57 +00:00
Adds better validation messages
This commit is contained in:
1 parent
194e4700c6
commit
9fdc1fac73
1 file changed
+2
-2
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user