useFormValidation
Import
import { mix, useFormValidation, BoltElement } from 'c/boltage';Usage
export default class myLwc extends mix( BoltElement, useFormValidation) { }Properties
Section titled “Properties”formValidity : boolean
Section titled “formValidity : boolean”Example
Section titled “Example” async updateRecord() { if(this.formValidity) await this.saveRecord(this.Case); }<template> <c-bolt-input lwc:spread={$Case.Status} /> <lightning-button onclick={updateRecord} /></template>isFormValid : boolean
Section titled “isFormValid : boolean”Example
Section titled “Example” async updateRecord() { if(this.isFormValid) await this.saveRecord(this.Case); }<template> <lightning-input data-checkable value={Case.Contact} /> <lightning-button onclick={updateRecord} /></template>