From 2180c00d994fbd7a0a776b093c5a432ce9ca6369 Mon Sep 17 00:00:00 2001 From: Jarrod Date: Sun, 3 Mar 2019 06:30:31 +1100 Subject: [PATCH] Give custom form validators a `this` context relative to the Vue component Could be useful if the validity of one form field is dependent on the state of another. --- .../new/templates/assets/js/components/ajax-form.component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core-generators/new/templates/assets/js/components/ajax-form.component.js b/lib/core-generators/new/templates/assets/js/components/ajax-form.component.js index 8cc11d8f..1d5bd649 100644 --- a/lib/core-generators/new/templates/assets/js/components/ajax-form.component.js +++ b/lib/core-generators/new/templates/assets/js/components/ajax-form.component.js @@ -277,7 +277,7 @@ parasails.registerComponent('ajaxForm', { // ® Provided function must return truthy when invoked with the value. try { violation = ( - !ruleRhs(fieldValue) + !ruleRhs.call(this, fieldValue) ); } catch (err) { console.warn(err);