updated checkOldPassword validator
This commit is contained in:
parent
e5800875c2
commit
68e9c55925
|
@ -193,9 +193,9 @@ func (form *RecordUpsert) validateFormFields() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (form *RecordUpsert) checkOldPassword(value any) error {
|
func (form *RecordUpsert) checkOldPassword(value any) error {
|
||||||
v, _ := value.(string)
|
v, ok := value.(string)
|
||||||
if v == "" || form.record.IsNew() {
|
if !ok {
|
||||||
return nil // nothing to check
|
return validators.ErrUnsupportedValueType
|
||||||
}
|
}
|
||||||
|
|
||||||
if !form.record.Original().ValidatePassword(v) {
|
if !form.record.Original().ValidatePassword(v) {
|
||||||
|
|
Loading…
Reference in New Issue