rad-ui / ui

Rad UI is an open-source, headless UI component library for building modern, fast, performant, accessible React applications
http://rad-ui.com
MIT License
9 stars 11 forks source link

Issue: Incorrect error message in value validation. #345

Closed kotAPI closed 6 days ago

kotAPI commented 6 days ago
          **Issue: Incorrect error message in value validation.**

The error message incorrectly states the condition. It should say that the value should be greater than or equal to minValue and less than or equal to maxValue.

- `value should be smaller then ${minValue} and bigger then ${maxValue}`
+ `value should be greater than or equal to ${minValue} and less than or equal to ${maxValue}`
Committable suggestion > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion if (value < minValue || value > maxValue) { throw new Error( `value should be greater than or equal to ${minValue} and less than or equal to ${maxValue}` ) } `````

_Originally posted by @coderabbitai[bot] in https://github.com/rad-ui/ui/pull/343#discussion_r1654601311_