Addded hasErrors to menuitem tag