updated checkOldPassword validator

This commit is contained in:
Gani Georgiev 2024-11-23 10:21:23 +02:00
parent e5800875c2
commit 68e9c55925
1 changed files with 3 additions and 3 deletions

View File

@ -193,9 +193,9 @@ func (form *RecordUpsert) validateFormFields() error {
}
func (form *RecordUpsert) checkOldPassword(value any) error {
v, _ := value.(string)
if v == "" || form.record.IsNew() {
return nil // nothing to check
v, ok := value.(string)
if !ok {
return validators.ErrUnsupportedValueType
}
if !form.record.Original().ValidatePassword(v) {