Skip to content

Commit

Permalink
Update docs, see #228
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Dec 31, 2019
1 parent e583db9 commit cc4eb84
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/ValidatorDef.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ define( require => {
/**
* @private
* @param valueType
* @param {Object} options - requried, options from isValidValidator
* @param {Object} options - required, options from isValidValidator
* @returns {boolean} - true if valid
*/
validateValueType( valueType, options ) {
Expand Down Expand Up @@ -215,7 +215,8 @@ define( require => {

/**
* Determines whether a value is valid (returning a boolean value), and optionally throws an assertion error if the
* value is not valid.
* value is not valid. The reason assertions are (optionally) thrown from this method is so that we can have more
* specific error messages.
*
* @param {Object|null} value
* @param {ValidatorDef} validator
Expand Down Expand Up @@ -352,7 +353,7 @@ define( require => {
const validateValueOrElementType = ( type, options ) => {
if ( Array.isArray( type ) ) {

// If every type in the list is not valid, then return false, pass options through verbatum.
// If not every type in the list is valid, then return false, pass options through verbatim.
if ( !_.every( type.map( typeInArray => ValidatorDef.validateValueType( typeInArray, options ) ) ) ) {
return false;
}
Expand Down

0 comments on commit cc4eb84

Please sign in to comment.