Added validation for fields