Refactor the validation structure