Implement password change function
This commit is contained in:
9
packages/sshecret-frontend/src/api/validation.ts
Normal file
9
packages/sshecret-frontend/src/api/validation.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import type { Ref } from 'vue'
|
||||
import SlInput from '@shoelace-style/shoelace/dist/components/input/input.js'
|
||||
|
||||
|
||||
export function setFieldValidation(field: Ref<SlInput>, errorMessage: string = '') {
|
||||
// Set validation on a field
|
||||
field.value?.setCustomValidity(errorMessage)
|
||||
field.value?.reportValidity()
|
||||
}
|
||||
Reference in New Issue
Block a user