Refactoring documentvalidator

Before tackling plugin feature, I have refactored DocumentValidador's validation process.