I'm trying to use the jQuery Validation plug-in on a form on my site. Two problems -- it doesn't seem to work and I want to use alert boxes for the errors.

Here's the code:

<script type="text/javascript">
		function(value, element) {
			if (element.value == 0) {
				return false;
			} else {
				return true;
			"Please select an option."
		rules: {
			category: {
				require_categories: true

<form id="publishForm" method="post">
<select name="category[]" id="county">
<option value="">--</option>
<option value="1">County Name</option>
Any ideas why this isn't working? And how do I configure it to use alert boxes as opposed to inline errors?

Thank you for your help.