title: How to get the values for dynamically generated input field in react js?
body: <p>Hii I am new to React Js, After selecting count <code>InputCount</code>, I had generated input fields dynamically.Now I want to get the value for the inputs field and also I want to validate all the fields.</p>
  
  <pre><code>import React, { Component } from 'react';
  
  class App extends Component {
      constructor(props) {
          super(props);
          this.onChangeCount = this.onChangeCount.bind(this);
          this.onSubmit = this.onSubmit.bind(this);
          this.state = {,
              InputCount: "",
          }
      }
      onChangeCount(e) {
          this.setState({
              InputCount: e.target.value,
          })
      }
      render() {
              let options1 = []
              for (let j = 0; j &lt;= this.state.InputCount; j += 1) { options1.push(j); }
              return (
          {this.state.InputCount &amp;&amp; (
                                  options1.map((i) =&gt; {
                                      return (&lt;div&gt;
                                          &lt;input type="text" name="name" placeholder="Name" /&gt;&lt;br /&gt;
                                          &lt;input type="text" name="name" placeholder="RollNumber" /&gt;
                                      &lt;/div&gt;)
                                  })
                              )}
  </code></pre>
  
  <p>please help me to get value from the input fields and also validate the form.</p>