How to get hasFormFeedback

import { hasFormFeedback } from 'fds/system';

Type: Function

Checks whether or not any feedback is present in the passed formFeedbackByName. Is generally used in combination with Form.


# Name Type Description
1. formFeedbackByName Object<Name | FormFeedback>

Form feedback keyed by name (corresponds with the "name" prop on form components).


Type: String

The name of this component to identify it (and its value) when used inside an intelligent container component which aggregates its children (and/or their values), like a Form.


Type: Object

Specifies human readable validation coming from user input in a form component. Generally returned from a "validate" prop callback.


Name Type Description
connotation String

The connotation type name.

Specifies the meaning and/or severity of the given feedback. The possible values are: (from least to most severe)

  • 'success'

  • 'info'

  • 'warning'

  • 'error'

message node

The feedback message.

The human readable message displayed in the component, displayed inside a Text component if you use a string. If you want to display inlines (such as a TextLink component) inside your message. You have to provide the Text component yourself. In that case, take care to set the align and colorName prop as appropriate. For the align prop, use "center" or omit it as appropriate. For the colorName prop, use "text-muted-color".


Type: Boolean

Whether or not any feedback is present.

Was this page helpful?