Fix type errors
This commit is contained in:
@ -1,9 +1,12 @@
|
||||
import type { Ref } from 'vue'
|
||||
import SlInput from '@shoelace-style/shoelace/dist/components/input/input.js'
|
||||
//import SlInput from '@shoelace-style/shoelace/dist/components/input/input.js'
|
||||
|
||||
|
||||
export function setFieldValidation(field: Ref<SlInput>, errorMessage: string = '') {
|
||||
export function setFieldValidation(field: Ref<any>, errorMessage: string = '') {
|
||||
// Set validation on a field
|
||||
if (!field.value) {
|
||||
return
|
||||
}
|
||||
field.value?.setCustomValidity(errorMessage)
|
||||
field.value?.reportValidity()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user