Remove duplicate code
Merge pull request #5056 from lucasmichot/4.2-validator

[4.2] Validator : remove duplicate code