Commit 2c46ee5c authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Define the $r object before use (I fixed it on the wiki too). Minor whitespace.

parent 76bf4114
......@@ -47,11 +47,10 @@ function form_rule_required($field) {
* string The error message, if the value is invalid.
function form_rule_required_js($id) {
$r = new StdClass;
$r->condition = '$(\'' . $id . '\').value != \'\'';
$r->message = get_string('This field is required');
return $r;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment