#424 merged branches

This pull request include changes from @MG84 and the changes to allow more generic validations.