@@ -37,11 +37,11 @@ $validator->isValid('myIdentity', [
37
37
38
38
## Validation messages
39
39
40
- Authentication validator defines five failure message types. Identifiers
40
+ The authentication validator defines five failure message types; identifiers
41
41
for them are available as constants for convenience.
42
42
Common authentication failure codes, defined as constants in
43
43
` Zend\Authentication\Result ` , are mapped to validation messages
44
- using map in ` CODE_MAP ` constant. Other authentication codes default to
44
+ using a map in ` CODE_MAP ` constant. Other authentication codes default to the
45
45
` general ` message type.
46
46
47
47
``` php
@@ -66,21 +66,21 @@ class Authentication
66
66
}
67
67
```
68
68
69
- Authentication validator extends ` Zend\Validator\AbstractValidator ` and provides
70
- common for all framework validators way to access, change or translate message templates.
71
- More information is available in
69
+ The authentication validator extends ` Zend\Validator\AbstractValidator ` , providing
70
+ a way common for all framework validators to access, change or translate message templates.
71
+ More information is available in the
72
72
[ zend-validator documentation] ( https://docs.zendframework.com/zend-validator/messages/ )
73
73
74
74
## Configure validation messages for custom authentication result codes
75
75
76
- The constructor configuration option ` code_map ` allows to map custom codes
76
+ The constructor configuration option ` code_map ` allows mapping custom codes
77
77
from ` Zend\Authentication\Result ` to validation message identifiers.
78
78
` code_map ` is an array of integer code => string message identifier pairs
79
79
80
80
A new custom message identifier can be specified in ` code_map ` which will then
81
- be registered as a new message type with template value set to ` general ` message.
82
- Once registered, message template for the new identifier can be changed
83
- as described in [ zend-validator documentation] ( https://docs.zendframework.com/zend-validator/messages/ )
81
+ be registered as a new message type with the template value set to the ` general ` message.
82
+ Once registered, the message template for the new identifier can be changed
83
+ as described in the [ zend-validator documentation] ( https://docs.zendframework.com/zend-validator/messages/ ) .
84
84
85
85
``` php
86
86
use Zend\Authentication\Validator\Authentication as AuthenticationValidator;
0 commit comments