HasValidator returns whether a specific ASTValidator has been configured in the environment.
(name string)
| 744 | |
| 745 | // HasValidator returns whether a specific ASTValidator has been configured in the environment. |
| 746 | func (e *Env) HasValidator(name string) bool { |
| 747 | for _, v := range e.validators { |
| 748 | if v.Name() == name { |
| 749 | return true |
| 750 | } |
| 751 | } |
| 752 | return false |
| 753 | } |
| 754 | |
| 755 | // Validators returns a shallow copy of the set of ASTValidators configured on the environment. |
| 756 | func (e *Env) Validators() []ASTValidator { |