@sinet/validation
Advanced tools
Comparing version 1.2.8 to 1.2.9
{ | ||
"name": "@sinet/validation", | ||
"version": "1.2.8", | ||
"version": "1.2.9", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -47,3 +47,3 @@ 'use strict'; | ||
'id' : Joi.string().guid().required().description( 'The indicator id' ), | ||
'type' : Joi.number().integer().required().description( 'The indicator type' ), | ||
'type' : Joi.number().integer().valid( [ 1, 2, 3, 4, 5 ] ).required().description( 'The indicator type' ), | ||
'questionText' : Joi.string().required().description( 'The text of the question -- Sanitizes HTML' ), | ||
@@ -54,3 +54,7 @@ 'answerText' : ( setAnswerText() ), | ||
'score' : ( setScore() ), | ||
'isRequired' : Joi.boolean().default( false ).description( 'Whether the indicator response is required for observation completion' ), | ||
'isRequired' : Joi.when( 'type', { | ||
'is' : [ 1, 2, 3, 4 ], | ||
'then' : Joi.boolean().default( false ).description( 'Whether the indicator response is required for observation completion' ), | ||
'otherwise' : Joi.forbidden() | ||
} ), | ||
@@ -57,0 +61,0 @@ 'prescribedResources' : Joi.array().optional() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19742
377