Skip to content

Commit

Permalink
chore(docs): update validate in other components
Browse files Browse the repository at this point in the history
  • Loading branch information
wingkwong committed May 28, 2024
1 parent 2447a15 commit c00316e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/docs/content/docs/components/date-input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ import {parseZonedDateTime} from "@internationalized/date";
| locale | `string` | The locale to display and edit the value according to. | - |
| description | `ReactNode` | A description for the date input. Provides a hint such as specific requirements for what to choose. | - |
| errorMessage | `ReactNode \| (v: ValidationResult) => ReactNode` | An error message for the date input. | - |
| validate | `(value: MappedDateValue<DateValue>) => ValidationError | true | null | undefined` | Validate input values when committing (e.g., on blur), and return error messages for invalid values. | - |
| validate | `(value: MappedDateValue<DateValue>) => ValidationError | true | null | undefined` | Validate input values when committing (e.g., on blur), and return error messages for invalid values. Validation errors are displayed to the user when the form is submitted if `validationBehavior` is set to `native`. For realtime validation, use the `isInvalid` prop instead.| - |
| validationBehavior | `native` \| `aria` | Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.| `aria` |
| startContent | `ReactNode` | Element to be rendered in the left side of the date input. | - |
| endContent | `ReactNode` | Element to be rendered in the right side of the date input. | - |
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/components/date-picker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ import {I18nProvider} from "@react-aria/i18n";
| placeholderValue | `ZonedDateTime` \| `CalendarDate` \| `CalendarDateTime` \| `undefined` \| `null` | The placeholder of the date-picker. | - |
| description | `ReactNode` | A description for the date-picker. Provides a hint such as specific requirements for what to choose. | - |
| errorMessage | `ReactNode \| (v: ValidationResult) => ReactNode` | An error message for the date input. | - |
| validate | `(value: MappedDateValue<DateValue>) => ValidationError | true | null | undefined` | Validate input values when committing (e.g., on blur), and return error messages for invalid values. | - |
| validate | `(value: MappedDateValue<DateValue>) => ValidationError | true | null | undefined` | Validate input values when committing (e.g., on blur), and return error messages for invalid values. Validation errors are displayed to the user when the form is submitted if `validationBehavior` is set to `native`. For realtime validation, use the `isInvalid` prop instead.| - |
| validationBehavior | `native` \| `aria` | Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.| `aria` |
| startContent | `ReactNode` | Element to be rendered in the left side of the date-picker. | - |
| endContent | `ReactNode` | Element to be rendered in the right side of the date-picker. | - |
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/components/date-range-picker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ import {I18nProvider} from "@react-aria/i18n";
| placeholderValue | `ZonedDateTime` \| `CalendarDate` \| `CalendarDateTime` \| `undefined` \| `null` | The placeholder of the date-range-picker. | - |
| description | `ReactNode` | A description for the date-range-picker. Provides a hint such as specific requirements for what to choose. | - |
| errorMessage | `ReactNode \| (v: ValidationResult) => ReactNode` | An error message for the date input. | - |
| validate | `(value: RangeValue<MappedDateValue<DateValue>>) => ValidationError | true | null | undefined` | Validate input values when committing (e.g., on blur), and return error messages for invalid values. | - |
| validate | `(value: RangeValue<MappedDateValue<DateValue>>) => ValidationError | true | null | undefined` | Validate input values when committing (e.g., on blur), and return error messages for invalid values. Validation errors are displayed to the user when the form is submitted if `validationBehavior` is set to `native`. For realtime validation, use the `isInvalid` prop instead.| - |
| validationBehavior | `native` \| `aria` | Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA. | `aria` |
| startContent | `ReactNode` | Element to be rendered in the left side of the date-range-picker. | - |
| endContent | `ReactNode` | Element to be rendered in the right side of the date-range-picker. | - |
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/components/radio-group.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ In case you need to customize the radio group even further, you can use the `use
| defaultValue | `string[]` | The default selected value. (uncontrolled). | - |
| description | `ReactNode` | Radio group description . | - |
| errorMessage | `ReactNode` \| `((v: ValidationResult) => ReactNode)` | Radio group error message. | - |
| validate | `(value: string) => ValidationError | true | null | undefined` | Validate input values when committing (e.g. on blur), and return error messages for invalid values. | - |
| validate | `(value: string) => ValidationError | true | null | undefined` | Validate input values when committing (e.g. on blur), and return error messages for invalid values. Validation errors are displayed to the user when the form is submitted if `validationBehavior` is set to `native`. For realtime validation, use the `isInvalid` prop instead.| - |
| validationBehavior | `native` \| `aria` | Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.| `aria` |
| isDisabled | `boolean` | Whether the radio group is disabled. | `false` |
| isRequired | `boolean` | Whether user checkboxes are required on the input before form submission. | `false` |
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/components/range-calendar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ Here's the example to customize `topContent` and `bottomContent` to have some pr
| isDateUnavailable | `(date: DateValue) => boolean` | Callback that is called for each date of the calendar. If it returns true, then the date is unavailable. | - | |
| createCalendar | `(calendar: SupportedCalendars) => Calendar \| null` | This function helps to reduce the bundle size by providing a custom calendar system. You can also use the NextUIProvider to provide the createCalendar function to all nested components. | `all<br> calendars` | |
| errorMessage | `ReactNode \| (v: ValidationResult) => ReactNode` | An error message for the field. | - | |
| validate | `(value: { inputValue: string, selectedKey: React.Key }) => ValidationError | true | null | undefined` | Validate time input values when committing (e.g. on blur), and return error messages for invalid values. | - | |
| validate | `(value: { inputValue: string, selectedKey: React.Key }) => ValidationError | true | null | undefined` | Validate time input values when committing (e.g. on blur), and return error messages for invalid values. Validation errors are displayed to the user when the form is submitted if `validationBehavior` is set to `native`. For realtime validation, use the `isInvalid` prop instead.| - | |
| hideDisabledDates | `boolean` | Whether to hide the disabled or invalid dates. | `false` | |
| disableAnimation | `boolean` | Whether to disable the animation of the calendar. | `false` | |
| classNames | `Record<"base"| "prevButton"| "nextButton"| "headerWrapper" \| "header" \| "title" \| "content" \| "gridWrapper" \| "grid" \| "gridHeader" \| "gridHeaderRow" \| "gridHeaderCell" \| "gridBody" \| "gridBodyRow" \| "cell" \| "cellButton" \| "pickerWrapper" \| "pickerMonthList" \| "pickerYearList" \| "pickerHighlight" \| "pickerItem" \| "helperWrapper" \| "errorMessage", string>` | Allows to set custom class names for the calendar slots. | - | |
Expand Down
Loading

0 comments on commit c00316e

Please sign in to comment.