diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-02 12:08:18 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-02 12:08:18 +0000 |
commit | 684d65316ac77c62f47d68b9926eea8af30db227 (patch) | |
tree | d1f4c4eec399d7772ab4ad6294f98e7505c1cee5 /config/initializers/grape_validators.rb | |
parent | ade18c9d68d5a2e6c6e28ef7e9d3add3b3491ace (diff) | |
download | gitlab-ce-684d65316ac77c62f47d68b9926eea8af30db227.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/initializers/grape_validators.rb')
-rw-r--r-- | config/initializers/grape_validators.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/config/initializers/grape_validators.rb b/config/initializers/grape_validators.rb new file mode 100644 index 00000000000..9d2b6dc9bd1 --- /dev/null +++ b/config/initializers/grape_validators.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +Grape::Validations.register_validator(:absence, ::API::Validations::Validators::Absence) +Grape::Validations.register_validator(:file_path, ::API::Validations::Validators::FilePath) +Grape::Validations.register_validator(:git_ref, ::API::Validations::Validators::GitRef) +Grape::Validations.register_validator(:git_sha, ::API::Validations::Validators::GitSha) +Grape::Validations.register_validator(:integer_none_any, ::API::Validations::Validators::IntegerNoneAny) +Grape::Validations.register_validator(:array_none_any, ::API::Validations::Validators::ArrayNoneAny) +Grape::Validations.register_validator(:check_assignees_count, ::API::Validations::Validators::CheckAssigneesCount) |