fixed handling of required field in TextField