Skip to content

Instantly share code, notes, and snippets.

@nhanco
Created March 7, 2018 14:51
Show Gist options
  • Save nhanco/1e3a4ee13b90f33f24bf32eafdfae79d to your computer and use it in GitHub Desktop.
Save nhanco/1e3a4ee13b90f33f24bf32eafdfae79d to your computer and use it in GitHub Desktop.
[DOM] Password field is not contained in a form: (More info: https://goo.gl/9p2vKq) <input type=​"password" placeholder=​"Password" class=​"form-control">​
import React, { Component, PropTypes } from "react"
import { Form, FormGroup, Label, Button, Input, InputGroup, InputGroupAddon, InputGroupText } from "reactstrap"
export default class Login extends React.Component {
render() {
return (
<Form className="was-validated">
<InputGroup className="mb-3">
<InputGroupAddon addonType="prepend">
<InputGroupText>
<i className="icon-user" />
</InputGroupText>
</InputGroupAddon>
<Input
type="email"
name="email"
autoComplete="email"
placeholder="Email"
id="authEmail"
/>
</InputGroup>
<InputGroup className="mb-4">
<InputGroupAddon addonType="prepend">
<InputGroupText>
<i className="icon-lock" />
</InputGroupText>
</InputGroupAddon>
<Input
type="password"
placeholder="Password"
name="password"
autoComplete="current-password"
className="form-control-warning"
id="authPassword"
/>
</InputGroup>
<div className="text-right">
<Button color="primary" className="px-4">Login</Button>
</div>
</Form>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment