WebContent/js/edit/benchmark.js
/**
 * Attaches form validation to the 'edit benchmark' fields
 */
Attaches form validation to the 'edit benchmark' fields
Attaches form validation to the ' edit benchmark ' fields
function attachFormValidation() {
	$("#editBenchmarkForm").submit(function(e) {
		e.preventDefault();
	});
	addValidators();
	$("#editBenchmarkForm").validate({
		rules: {
			name: {
				required: true,
				maxlength: $("#name").attr("maxlength"),
				jspregex: "DUMMY REGEX"
			},
			description: {
				maxlength: $("#description").attr("length"),
				regex: getPrimDescRegex()
			}
		},
		messages: {
			name: {
				required: "name required",
				maxlength: $("#name").attr("maxlength") + " characters maximum",
				jspregex: "invalid character(s)"
			},
			description: {
				maxlength: $("#description")
				.attr("length") + " characters maximum",
				regex: "invalid character(s)"
			}
		}
	});
}
function attachFormValidation ( ) { $ ( "#editBenchmarkForm" ) . submit ( function ( e ) { e . preventDefault ( ) ; } ) ; addValidators ( ) ; $ ( "#editBenchmarkForm" ) . validate ( { rules : { name : { required : true , maxlength : $ ( "#name" ) . attr ( "maxlength" ) , jspregex : "DUMMY REGEX" } , description : { maxlength : $ ( "#description" ) . attr ( "length" ) , regex : getPrimDescRegex ( ) } } , messages : { name : { required : "name required" , maxlength : $ ( "#name" ) . attr ( "maxlength" ) + " characters maximum" , jspregex : "invalid character(s)" } , description : { maxlength : $ ( "#description" ) . attr ( "length" ) + " characters maximum" , regex : "invalid character(s)" } } } ) ; }
Attaches form validation to the 'edit benchmark' fields
Attaches form validation to the ' edit benchmark ' fields
// Pressing the enter key on an input field triggers a submit,
 // and this special validation process doesn't use submit, so
 // the following code prevents that trigger
 // Adds regular expression handling to validator
 // Form validation rules/messages
