Skip to content

Commit

Permalink
fixed whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Curry committed Jan 5, 2010
1 parent 68afd0d commit 4672ab2
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions controllers/js_validate_controller.php
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
<?php
class JsValidateController extends JsValidateAppController {
var $name = 'JsValidate';
var $helpers = array('Javascript', 'JsValidate.Validation');
var $components = array('RequestHandler');

function beforeFilter() {
var $helpers = array('Javascript', 'JsValidate.Validation');
var $components = array('RequestHandler');

function beforeFilter() {

}

}

function field($fieldId) {
Configure::write('debug', 0);

$modelName = array_shift(array_keys($this->data));
$Model = ClassRegistry::init($modelName);
$Model->data = $this->data;

$fieldName = array_shift(array_keys(array_shift($this->data)));

$output = array('field' => $fieldId);
$output['result'] = $Model->validates(array('fieldList' => array($fieldName)));

$errors = $Model->validationErrors;
if($errors) {
if ($errors) {
$output['message'] = array_pop($errors);
}

$this->set('output', $output);
}

function test() {
if (Configure::read('debug') < 1) {
die(__('Debug setting does not allow access to this url.', true));
}
die(__('Debug setting does not allow access to this url.', true));
}
}

function test_min() {
if (Configure::read('debug') < 1) {
die(__('Debug setting does not allow access to this url.', true));
}
die(__('Debug setting does not allow access to this url.', true));
}
}
}

?>

0 comments on commit 4672ab2

Please sign in to comment.