add error to modal when not valid