Fix validating fields and templates