You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The root div initially has only data-filled. When I focus then blur without typing anything, it gets data-valid. But if I type something (to make it dirty) and revert back to old value, it gets data-invalid. The input always has :invalid pseudo-class in these scenarios.
Expected behavior
Field should validate the initial value (I'm not sure if this behavior is intended or not).
The validation should be consistent between dirty value and non-dirty value.
Base UI version
v1.0.0-alpha.8
Which browser are you using?
Chrome
Which OS are you using?
Mac OS
The text was updated successfully, but these errors were encountered:
nsmag
changed the title
[Field] the initial value is not validated and the validation is inconsistent
[Field] The initial value is not validated and the validation is inconsistent
Apr 25, 2025
Field should validate the initial value (I'm not sure if this behavior is intended or not).
This one is expected - it only validates on blur by default, but it requires it to have been marked dirty to reduce error noise, however this should probably only apply to required validation (to check empty values) rather than anything else
The validation should be consistent between dirty value and non-dirty value.
This one looks like a bug, addressing how required validation works should also fix this
Bug report
Current behavior
Field
does not validate the initial value and the validation is inconsistent and incorrect.With this code:
The root
div
initially has onlydata-filled
. When I focus then blur without typing anything, it getsdata-valid
. But if I type something (to make it dirty) and revert back to old value, it getsdata-invalid
. Theinput
always has:invalid
pseudo-class in these scenarios.Expected behavior
Field
should validate the initial value (I'm not sure if this behavior is intended or not).Base UI version
v1.0.0-alpha.8
Which browser are you using?
Chrome
Which OS are you using?
Mac OS
The text was updated successfully, but these errors were encountered: