public Builder addValidator(Validator validator) {
            if (!CORRECTNESS_VALIDATORS.containsKey(validator.getClass())) {
                if (ValidationUtils.isCriticalValidator(validator.getClass())) {
                    criticalValidators.get().add(validator);
                } else {
                    validators.get().add(validator);
                }
            }
            return this;
        }
Adds a {@link Validator}.

@param validator Validator to add.
@return Returns the builder.
smithy-model/src/main/java/software/amazon/smithy/model/loader/ModelValidator.java