text: import React from 'react';
  import { Password, Label } from 'romagny13-react-form-validation';
  
  class Example1 extends React.Component {
      constructor(props) {
          super(props);
  
          this.state = {
              model: {
                  password: 'Secret'
              },
              touched: {}
          };
  
          this.onValueChange = this.onValueChange.bind(this);
          this.onTouch = this.onTouch.bind(this);
      }
      onValueChange(name, value) {
          let model = this.state.model;
          model[name] = value;
  
          this.setState({
              model
          });
      }
      onTouch(name) {
          let touched = this.state.touched;
          touched[name] = true;
          this.setState({
              touched
          });
      }
      render() {
          const { model, touched } = this.state;
          return (
              <div>
                  <Label htmlFor="password" asterisk>Password</Label>
                  <Password width="200px" id="password" name="password" value={model["password"]} onValueChange={this.onValueChange} onTouch={this.onTouch} placeholder="Password" />
                  {touched["password"] && <span className="touched">Touched!</span>}
                  <pre>
                      {JSON.stringify(model)}
                  </pre>
              </div>
          );
      }
  }
  
  export default Example1;
  