How to use the redux-form.getFormSyncErrors function in redux-form

To help you get started, we’ve selected a few redux-form 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 marmelab / react-admin / src / mui / form / TabbedForm.js View on Github external
const collectErrors = state => {
    const syncErrors = getFormSyncErrors('record-form')(state);
    const asyncErrors = getFormAsyncErrors('record-form')(state);
    const submitErrors = getFormSubmitErrors('record-form')(state);

    return {
        ...syncErrors,
        ...asyncErrors,
        ...submitErrors,
    };
};
github entando / entando-components / plugins / entando-plugin-dashboard / app-builder / src / ui / widgets / charts / line-chart / containers / DashboardLineChartFormContainer.js View on Github external
export const mapStateToProps = state => ({
  chart: 'line',
  datasource: selector(state, 'datasource'),
  formSyncErrors: getFormSyncErrors(FORM_NAME)(state),
  axis: { rotated: selector(state, 'axis.rotated') },
  spline: selector(state, 'spline'),
  columns: selector(state, 'columns'),

  initialValues: {
    axis: {
      chart: 'line',
      rotated: false,
      x: { type: 'indexed' },
      y2: { show: false },
    },
    size: {
      width: 300,
      height: 500,
    },
    padding: {
github entando / entando-components / plugins / entando-plugin-dashboard / app-builder / src / ui / widgets / charts / gauge-chart / containers / DashboardGaugeChartFormContainer.js View on Github external
export const mapStateToProps = state => ({
  datasource: selector(state, 'datasource'),
  formSyncErrors: getFormSyncErrors(FORM_NAME)(state),
  chart: 'gauge',
  columns: selector(state, 'columns'),

  initialValues: {
    chart: 'gauge',
    axis: {
      rotated: false,
      x: { type: 'indexed' },
      y2: { show: false },
    },
    size: {
      width: 300,
      height: 500,
    },
    padding: {
      top: 50,
github qhacks / qhacks-dashboard / packages / client / components / Forms / ApplyForm.js View on Github external
function mapStateToProps(state, ownProps) {
  return {
    ...ownProps,
    applicationFormErrorMessage: getApplicationFormErrorMessages(state),
    syncErrors: getFormSyncErrors("apply")(state),
    values: getFormValues("apply")(state)
  };
}
github marmelab / redux-form-inspector / src / index.js View on Github external
return connect((state) => {
        const fieldValues = getFormValues(form)(state);
        const errors = {
            ...getFormAsyncErrors(form)(state),
            ...getFormSyncErrors(form)(state),
        };

        const inspection = Object.keys(fieldsToProps).reduce((r, prop) => ({
            ...r,
            [prop]: fieldValues ? fieldsToProps[prop](fieldValues, errors) : null,
        }), {});

        return !inspectorKey ? inspection : { [inspectorKey]: inspection };
    }, () => ({}));
};
github entando / entando-components / plugins / entando-plugin-dashboard / app-builder / src / ui / widgets / charts / pie-chart / containers / DashboardPieChartFormContainer.js View on Github external
export const mapStateToProps = (state) => {
  const selector = formValueSelector(FORM_NAME);

  return {
    chart: 'pie',
    datasource: selector(state, 'datasource'),
    formSyncErrors: getFormSyncErrors(FORM_NAME)(state),

    initialValues: {
      chart: 'pie',
      axis: {
        rotated: false,
        x: { type: 'indexed' },
        y2: { show: false },
      },
      size: {
        width: 300,
        height: 500,
      },
      padding: {
        top: 50,
        right: 50,
        bottom: 50,
github Noitidart / Chrome-Store-Foxified / src / webext / dashboard / Dashboard / Pages / DashboardPage / AddForm / ErrorBox / index.js View on Github external
function(state, { form }: OwnProps) {
        return {
            syncErrors: getFormSyncErrors(form)(state),
            asyncErrors: getFormAsyncErrors(form)(state),
            submitErrors: getFormSubmitErrors(form)(state),
            submitting: isSubmitting(form)(state)
        }
    }
)
github marmelab / react-admin / packages / ra-ui-materialui / src / form / TabbedForm.js View on Github external
const collectErrors = (state, props) => {
    const syncErrors = getFormSyncErrors(props.form)(state);
    const asyncErrors = getFormAsyncErrors(props.form)(state);
    const submitErrors = getFormSubmitErrors(props.form)(state);

    return {
        ...syncErrors,
        ...asyncErrors,
        ...submitErrors,
    };
};
github Twilio-org / phonebank / public / src / containers / view_create_calls.jsx View on Github external
function mapStateToProps(state) {
  return {
    user_id: state.auth.id,
    current_campaign: state.admin_campaigns.current_campaign,
    has_user_joined_campaign: state.admin_campaigns.has_user_joined_campaign,
    current_script: state.admin_scripts.current_script,
    script_questions: state.admin_scripts.script_questions,
    current_call: state.calls.current_call,
    call_id: state.calls.call_id,
    status: state.calls.status,
    outcome: state.calls.outcome,
    contact_id: state.calls.contact_id,
    current_call_contact_name: state.calls.current_call_contact_name,
    form_errors: getFormSyncErrors(FORM)(state)
  };
}
github entando / entando-components / plugins / entando-plugin-dashboard / app-builder / src / ui / widgets / charts / bar-chart / containers / DashboardBarChartFormContainer.js View on Github external
export const mapStateToProps = state => ({
  chart: 'bar',
  datasource: selector(state, 'datasource'),
  formSyncErrors: getFormSyncErrors(FORM_NAME)(state),
  axis: { rotated: selector(state, 'axis.rotated') },
  columns: selector(state, 'columns'),
  initialValues: {
    axis: {
      chart: 'bar',
      rotated: false,
      x: { type: 'indexed' },
      y2: { show: false },
    },
    size: {
      width: 300,
      height: 500,
    },
    padding: {
      top: 50,
      right: 50,