Validate Elm
- Validates any input elm added in replaceable part.
Features/Functionality
- It will validate the property passed on item.
- It will also show the errors.
- Component is container responsive.
- It is cross browser compatible. (IE11, Edge, Firefox, chrome).
Important Note
- Donot give same name to variables/methods inside this element as of outer element.
Basic Usage
Dependencies
- jquery
- font-awesome
- shared styles
- shared scripts
HTML Structure
<require from="{user_path}/validate_elms/validate_elm"></require>
<cst-validate rule-prop.bind="{property}" item.bind="{item}" controller-instance="{instance}"></cst-validate>
Bindable Properties
Property Name | Data Type | Required | Decription |
---|---|---|---|
ruleProp | string | Yes | Property on which validation will be triggerred. |
item | object | Yes | Data object on which validations will be applied. |
controllerInstance | instance | Yes | Instance of Validation Controller |
idPrefix | string | Yes | Unique identifier prefix |
isInitialTrigger | boolean | No | To trigger validations manually |
Rules
Working Example
HTML
<template>
<require from="./shared/custom_comp/validate_elms/validate_elm"></require>
<div>
<cst-validate rule-prop.bind="property" item.bind="item" controller-instance="instance"></cst-validate>
</div>
</template>
JS
class MyCls{
constructor(){
}
}
export { MyCls }
Example Screen Shots
Desktop
IE Desktop
Tab
Mobile
Demo Link
Demo
Mark down usage
https://guides.github.com/features/mastering-markdown/
Version | Date | Developed By | Information Classification | Reviewed By | Approved By |
---|---|---|---|---|---|
1.0 | 04-12-2019 | Gunjan | INTERNAL | Prasan |