How to use the @commercetools-frontend/ui-kit.MoneyInput.isTouched function in @commercetools-frontend/ui-kit

To help you get started, we’ve selected a few @commercetools-frontend/ui-kit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github commercetools / ui-kit / examples / form-inputs.example.story.js View on Github external
value={this.props.formik.values.price}
            onChange={this.props.formik.handleChange}
            onBlur={this.props.formik.handleBlur}
            currencies={currencies}
            isDisabled={this.props.formik.isSubmitting}
            hasError={
              MoneyInput.isTouched(this.props.formik.touched.price) &&
              Boolean(this.props.formik.errors.price)
            }
          />
          {MoneyInput.isTouched(this.props.formik.touched.price) &&
            this.props.formik.errors.price &&
            this.props.formik.errors.price.missing && (
              Missing price
            )}
          {MoneyInput.isTouched(this.props.formik.touched.price) &&
            this.props.formik.errors.price &&
            this.props.formik.errors.price.unsupportedHighPrecision && (
              
                This value is a high precision value. High precision pricing is
                not supported for products.
              
            )}