Added validation to fields