middlewares/validator.js
// Check if a valenceUnit contains more than 3 tokens (Should always be at most FE.PT.GF)
Check if a valenceUnit contains more than 3 tokens (Should always be at most FE.PT.GF)
Check if a valenceUnit contains more than 3 tokens ( Should always be at most FE . PT . GF )
function validateQueryVPvalenceUnitLength(context, next) {
  if (getMaxValenceTokens(context.query.vp) > 3) {
    throw new ApiError.InvalidQueryParams(`MaxValenceLengthExceeded in context.query.vp = '${context.query.vp}'. A valence can only contain up to 3 tokens FE.PT.GF separated by a dot`);
  }
  logger.debug('context.query.vp parameter contains valid valence units token counts');
  return next();
}
function validateQueryVPvalenceUnitLength ( context , next ) { if ( getMaxValenceTokens ( context . query . vp ) > 3 ) { throw new ApiError . InvalidQueryParams ( ` ${ context . query . vp } ` ) ; } logger . debug ( 'context.query.vp parameter contains valid valence units token counts' ) ; return next ( ) ; }
Check if a valenceUnit contains more than 3 tokens (Should always be at most FE.PT.GF)
Check if a valenceUnit contains more than 3 tokens ( Should always be at most FE . PT . GF )