Move validation where it's supposed to be