write minlength on ajax code