Skip to content

Instantly share code, notes, and snippets.

@kuanee
kuanee / ReduxFieldGroup.jsx
Created October 9, 2017 05:21
Using react-bootstrap with redux-form
import React from 'react';
import { Field } from 'redux-form';
import { FormGroup, ControlLabel, FormControl, HelpBlock } from 'react-bootstrap';
function FieldGroup({ input, meta, ...rest}) {
const { name, label, help, ...props } = rest;
let validationState;
if (!meta.touched) {
validationState = null;
@kuanee
kuanee / example_form.jsx
Last active October 12, 2020 11:51
Using Joi Validation with redux-form
import createValidator from 'joi_redux_form.js';
import { reduxForm } from 'redux-form';
const schema = {
name: Joi.string().required(),
description: Joi.string().required(),
};
function ExampleForm(props) {
return (