From d79d3a8cba2623af4a488eb2096d595cb4a4deac Mon Sep 17 00:00:00 2001 From: Kshitiz Singh Date: Mon, 29 Sep 2014 11:34:53 +0530 Subject: [PATCH] jquery .val() not .value In line 180. It should be .val() instead of .value. This is my first edit. --- docs/guide/input-validation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/input-validation.md b/docs/guide/input-validation.md index ef6494d8ec..964706f100 100644 --- a/docs/guide/input-validation.md +++ b/docs/guide/input-validation.md @@ -177,7 +177,7 @@ function whose return value determines whether to apply the rule or not. For exa ['state', 'required', 'when' => function ($model) { return $model->country == 'USA'; }, 'whenClient' => "function (attribute, value) { - return $('#country').value == 'USA'; + return $('#country').val() == 'USA'; }"], ] ```