fixed error when docvalid command wihout any options

i fixed the docvalid command not to flush error messages when the command is called without any options.