fixed a bug where validate will add prepromptmessage also when onError is null