mui / mui/base-ui

[field] Does not invalidate certain required controls

Open
#1,425 3 comments 0 reactions 0 assignees View on GitHub
component: field component: radio group component: select has workaround type: bug
Dominant language
TypeScript
Stars
10.9k
Forks
543
Avg merge
1d 20h
Merged PRs (30d)
101

Description

# Bug report

## Reproducible example

RadioGroup: https://codesandbox.io/p/sandbox/sweet-brattain-q9ptqr
Select: https://codesandbox.io/p/sandbox/eloquent-pond-cgnlg5

## Current behavior

```jsx


{/* the rest of the select */}

This field is required

```

When there is no initial value (e.g. no `defaultValue`/`value` or `defaultValue=""`) and the validation mode is `"onBlur"`, Tabbing through the controls without making any selection doesn't not trigger the error

## Expected behavior

Validate different types of empty values correctly

## Base UI version

master & `1.0.0-alpha.5`

## Additional context

Only tried Input, RadioGroup and Select so far

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.