Skip to content

验证表单验证后再输入报错:TypeError: Cannot convert undefined or null to object #4694

@LeiLei-Liu

Description

@LeiLei-Liu

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

验证表单中的输入框,不填写内容,点击提交,触发验证,后再次输入,当失去焦点后,报错:TypeError: Cannot convert undefined or null to object。

bootstrap.blazor.bundle.min.js:6
Uncaught TypeError: Cannot convert undefined or null to object
at Function.values ()
at cs._isWithActiveTrigger (bootstrap.blazor.bundle.min.js:6:68800)
at bootstrap.blazor.bundle.min.js:6:64799
at g (bootstrap.blazor.bundle.min.js:6:2108)
at HTMLDivElement.a (bootstrap.blazor.bundle.min.js:6:2486)
at s (bootstrap.blazor.bundle.min.js:6:722)
at bootstrap.blazor.bundle.min.js:6:2537

Expected Behavior

修复Bug

Interactive render mode

Interactive Auto (Server, then client)

Steps To Reproduce

复现工程见附件,步骤如下:

  1. 点击Counter,后点击页面中的提交按钮;
  2. 2个输入框触发验证后,在任一输入框中输入内容;
  3. 当输入框失去焦点后,会触发异常报错:TypeError: Cannot convert undefined or null to object。

Demo.zip

Exceptions (if any)

No response

.NET Version

.Net 9.0

Anything else?

No response

Metadata

Metadata

Assignees

Labels

need-repro-projectNeed repro projectquestionQuestion that needs to be answered

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions