Parse Server validation pattern fails with default validationError


I have added password policy in parse-server in index.js

  passwordPolicy: {
    validatorPattern: /^(?=.{8,}) //Forcing atleast 8 characters
    validationError: '1. Password must contain at least 8 characters',
    resetTokenValidityDuration: 24\*60\*60, // expire after 24 hours

The validatorPattern is correctly checking valid passwords however, the validationError message is not shown and rather shows up the default: “Password does not meet the Password Policy requirements.”