Home > jQuery > jQuery Validate Plugin: Set Multiple Messages for Remote Rule
form.validate({
	rules: {
		username: {
			remote: {
				url: 'check_username.php',
				dataFilter: function(data) {
					var json = JSON.parse(data);
					if (json.result === true) {
						return 'true';
					}
					return '"' + json.message + '"';
				}
			}
		}
	}
});



Flag Counter