We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.5.2
使用表单输入,开启表单验证,文本框设置类型为number,设置输入长度限制,给绑定对象设置范围 1、maxlength="25"不起作用,导致可以输入非常大的数字 2、当输入一个大数后,点击其他地方,再点击输入框,让输入框获得焦点,然后报错
number
<MForm Model="_model" EnableValidation EnableI18n> <MTextField Label="测试" Outlined TValue="float?" Suffix="mA" Type="number" maxlength="25" @bind-Value="_model.testValue"></MTextField> <MButton>设置</MButton> <MButton>取消</MButton> </MForm>
class Model { [Required] [Range(4, 20)] public float? testValue{ get; set; } }
No response
dotnet 8.0
The text was updated successfully, but these errors were encountered:
@msmw13 maxlength 不是组件支持的属性,你需要设置:
<MTextField Type="number" NumberProps="n => n.Max = 25" />
Sorry, something went wrong.
@capdiem maxlength 在文本模式下有效,之前添加这个是为了解决报错问题,去掉也还会报错,不管绑定的类型是decimal或Int等数值类型。
No branches or pull requests
Masa.Blazor version
1.5.2
Describe the bug
使用表单输入,开启表单验证,文本框设置类型为
number
,设置输入长度限制,给绑定对象设置范围1、maxlength="25"不起作用,导致可以输入非常大的数字
2、当输入一个大数后,点击其他地方,再点击输入框,让输入框获得焦点,然后报错
Expected Behavior
No response
Steps To Reproduce
No response
Reproduction code
No response
.NET version
dotnet 8.0
What browsers are you seeing the problem on?
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: