Skip to content

Instantly share code, notes, and snippets.

View mikhuang's full-sized avatar

Michael Huang mikhuang

View GitHub Profile
@mikhuang
mikhuang / README.md
Last active January 6, 2017 01:02 — forked from eric1234/README.md
Polyfill for HTML5 required attribute

Purpose

Polyfill to provide support for the HTML5 "required" attribute on older browsers.

Does not provide a fancy interface like many browsers. Just a simple popup to let the user know the form is not ready. If users want a nicer interface they should use a nicer browser. :)

Usage

import React, { Component } from 'react'
import { connect } from 'react-redux'
import {merge, assign, isEmpty} from 'lodash'
import Form from "react-jsonschema-form"
import {nestDataByLevels, getNestedData} from './../models/modelUtil'
//import { Popover, PopoverContent } from 'reactstrap';
import paymentActions from '../actions/payments'
import cuid from 'cuid'