diff --git a/vuejs-docs/ns-ui/DataForm/dataform-validation.md b/vuejs-docs/ns-ui/DataForm/dataform-validation.md index 17d515c1c..4c18752fe 100644 --- a/vuejs-docs/ns-ui/DataForm/dataform-validation.md +++ b/vuejs-docs/ns-ui/DataForm/dataform-validation.md @@ -48,7 +48,9 @@ Here's the list with supported validators: You can choose when the validation of the changes happens by changing the data form's {% typedoc_link classes:RadDataForm,member:validationMode %} property. It accepts values from the {% typedoc_link enums:DataFormValidationMode %} enumeration. -``` + +```javascript + import { DataFormValidationMode } from 'nativescript-ui-dataform'; export default { @@ -127,13 +129,18 @@ export default { }, } }; + ``` -You should have in mind that the {% typedoc_link classes:RadDataForm,member:validationMode %} property is dependent on the value of the {% typedoc_link classes:RadDataForm,member:commitMode %} property, meaning that {% typedoc_link classes:RadDataForm %} will not let you commit property changes before you validate them. In other words: + +You should have in mind that the {% typedoc_link classes:RadDataForm,member:validationMode %} property is dependent on the value of the {% typedoc_link classes:RadDataForm,member:commitMode %} property, meaning that {% typedoc_link classes:RadDataForm %} will not let you commit property changes before you validate them. + +In other words: * If `commitMode` is {% typedoc_link enums:DataFormCommitMode,member:Immediate %}, validation is also immediate disregarding the value of the `validationMode` property * If `commitMode` is {% typedoc_link enums:DataFormCommitMode,member:OnLostFocus %}, validation is immediate, if `validationMode` is {% typedoc_link enums:DataFormValidationMode,member:Immediate %}, or {% typedoc_link enums:DataFormValidationMode,member:OnLostFocus %} otherwise * If `commitMode` is {% typedoc_link enums:DataFormCommitMode,member:Manual %}, validation will follow the value of `validationMode`. + ## Validation Events You can use the validation events to get notified when {% typedoc_link classes:RadDataForm %} validates its fields. You can also use these events for manual and/or asynchronous validation.