formly-js / angular-formly

JavaScript powered forms for AngularJS
http://docs.angular-formly.com
MIT License
2.22k stars 405 forks source link

Formly does not process PATTERN validation messages #725

Open sarunasBaltuonis opened 7 years ago

sarunasBaltuonis commented 7 years ago

Followed this example http://docs.angular-formly.com/docs/formlyvalidationmessages

app.run.js:

fvm.addTemplateOptionValueMessage('pattern', 'passwordPatternMessage', '', 'IS very invalid',  'Invalid Input');

form field:

key: 'newPassword',
                name: 'newPassword',
                type: 'input',
                templateOptions: {
                    type: 'password',
                    label: 'new password',
                    required: true,
                    minlength: 8,
                    maxlength: 40,
                    pattern: PASSWORD_REGEXP,
                    passwordPatternMessage: '"Password should be 8 symbols..."'
                },

Yet in error messages I get

ab8askAlj213 is invalid

All other validator messages work well.