import validate from './validations';
import Input from '../input/Input';

export default class InputEmail extends Input {
  static defaultProps = {
      validate: validate
  };

  constructor(props) {
    super(props);
  }
}

import React from 'react';
import classnames from 'classnames';

import validate from './validations';
import Input from '../input/Input';

import FieldComponent from '../FieldComponent';

export default class InputEmail extends FieldComponent {
  static defaultProps = {
      validate: validate
  };

  getValue() {
    return this.refs[this.name].getValue();
  }

  setValidationMessages(messages: string[]) {
    this.refs[this.name].setValidationMessages(messages);
  }

  render() {
      const className = classnames('InputEmail', this.props.className);
      return (
        <Input className={className}
               ref={this.name}
               {...this.props}
               validate={(value) => validate(value, this.props.maxDecimalPlaces, this.props.min)} />
      );
  }
}

Make inputemail component as controlled component
Make inputemail component as controlled component
