Skip to content

Move same ApplicationSetting validations to a single validation

Abdul Wadood requested to merge 420321-refactor-validates-numericality into master

What does this MR do and why?

We can pass multiple attributes to a single validation call. Therefore, we have moved the same validations to a single validation call which will reduce code duplication.

By default, numericality option does not allow nil values so using presence of is redundant. See https://guides.rubyonrails.org/active_record_validations.html#numericality.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #420321 (closed)

Merge request reports

Loading