import * as React from 'react'; import { render } from 'react-dom'; import Adult from './validations/adult'; import Child from './validations/child'; import Validate from '..'; import ValidatedField from './components/ValidatedField'; window.user = { firstName: 'Billy', lastName: 'Bob', email: '', job: '', age: 10, }; // Try swapping `as={Adult}` with `as={Child}`. render( {({ model, set, reset, isPristine, hasErrors, flush }) => (
{ e.preventDefault(); flush(); }}>

Profile

set(name, parseInt(value, 10))} />
)}
, document.getElementById('app') );