Added validation of some fields