Permalink
Browse files

fixed whitespace

  • Loading branch information...
Matt Curry
Matt Curry committed Jan 5, 2010
1 parent 68afd0d commit 4672ab22f9c71a269c9218ffe3c3de0debd3d16e
Showing with 16 additions and 17 deletions.
  1. +16 −17 controllers/js_validate_controller.php
@@ -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.