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

[4.2] Validator : remove duplicate code