<commit_before>import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
import TextField from 'material-ui/TextField';
import Paper from 'material-ui/Paper';
import RaisedButton from 'material-ui/RaisedButton';

const validate = (values) => {
  const errors = {};
  const requiredFields = [
    //"firstName",
    //"lastName",
    "email",
    "username",
    "password",
    "<PASSWORD>"
  ]
  requiredFields.map((field) => {
    if(!values[field]) {
      errors[field] = 'Required';
    }
  });

  if(values.password && values.password.length !== 0 && values.password !== values.confirmPassword) {
    errors['confirmPassword'] = 'Passwords do not match';
    errors['password'] = 'Passwords do not match';
  }
  if(values.email !== undefined && values.email.indexOf('@') === -1) {
    errors['email'] = 'Invalid Email: use @';
  }

  return errors;
}

const paperStyle = {
  display:"flex",
  flexDirection:"column",
  alignItems:"center"
  //background:"#00bcd4"
}

class CreateAccountForm extends Component {
  constructor(props) {
    super(props);

    this.renderTextField = this.renderTextField.bind(this);
    this.renderErrorMessage = this.renderErrorMessage.bind(this);
  }

  renderTextField({input, label, theType, meta: {touched, error}, onInputChange, theValue, ...custom}) {
    return (
      <TextField
        {...input}
        type={theType}
        floatingLabelText={label}
        floatingLabelStyle={{color:"#000000"}}
        underlineStyle={{color:"#000000"}}
        errorText={touched && error}
        value={theValue}
        onChange={onInputChange}
        autoComplete="off"
      />
    )
  }

  renderErrorMessage(errorMessage) {
    return (
      <div style={{color:"#f44336", margin:"5% 0% 1% 0%"}}><commit_msg>adjusted width on form and textfield lengths<commit_after>import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
import TextField from 'material-ui/TextField';
import Paper from 'material-ui/Paper';
import RaisedButton from 'material-ui/RaisedButton';

const validate = (values) => {
  const errors = {};
  const requiredFields = [
    //"firstName",
    //"lastName",
    "email",
    "username",
    "password",
    "confirmPassword"
  ]
  requiredFields.map((field) => {
    if(!values[field]) {
      errors[field] = 'Required';
    }
  });

  if(values.password && values.password.length !== 0 && values.password !== values.confirmPassword) {
    errors['confirmPassword'] = 'Passwords do not match';
    errors['password'] = 'Passwords do not match';
  }
  if(values.email !== undefined && values.email.indexOf('@') === -1) {
    errors['email'] = 'Invalid Email: use @';
  }

  return errors;
}

const paperStyle = {
  display:"flex",
  flexDirection:"column",
  alignItems:"center"
}

class CreateAccountForm extends Component {
  constructor(props) {
    super(props);

    this.renderTextField = this.renderTextField.bind(this);
    this.renderErrorMessage = this.renderErrorMessage.bind(this);
  }

  renderTextField({input, label, theType, meta: {touched, error}, onInputChange, theValue, ...custom}) {
    return (
      <TextField
        {...input}
        type={theType}
        floatingLabelText={label}
        floatingLabelStyle={{color:"#000000"}}
        underlineStyle={{color:"#000000"}}
        errorText={touched && error}
        value={theValue}
        onChange={onInputChange}
        autoComplete="off"
        style={{width:"90%"}}
      />
    )
  }

  renderErrorMessage(errorMessage) {
    return (
      <div style={{color:"#f44336", margin:"5% 0% 1% 0%"}}>
{'fraction_non_alphanumeric': 0.16089725837718083, 'fraction_numerical': 0.014123511492661313, 'mean_word_length': 3.41025641025641, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3383425', 'n_tokens_mistral': 1139, 'n_tokens_neox': 1090, 'n_words': 223}