renderField(field){

        const {meta}=field;
        const className=`form-group ${meta.touched && meta.error ? 'has-danger' : ''}`;



        return(
        <div className={className}>
            <label>{field.label}</label><br></br>
            <input
                className="form-title"
                type="text"
                {...field.input}
                
                />
               <div className="text-help">
               {meta.touched ? meta.error : ''}
               </div>  
        </div>
        );
    }
//the error property is automatically added to the field object from our validate function
the error property is automatically added to the field object from our validate function
the error property is automatically added to the field object from our validate function
renderField(field){
        const {meta}=field;
        const className=`form-group ${meta.touched && meta.error ? 'has-danger' : ''}`;
        return(
        <div className={className}>
            <label>{field.label}</label><br></br>
            <input
                className="form-title"
                type="text"
                {...field.input}
                />
               <div className="text-help">
               {meta.touched ? meta.error : ''}
               </div>  
        </div>
        );
    }
renderField ( field ) { const { meta } = field ; const className = ` ${ meta . touched && meta . error ? 'has-danger' : '' } ` ; return ( < div className = { className } > < label > { field . label } < / label > < br > < / br > < input className = "form-title" type = "text" { ... field . input } / > < div className = "text-help" > { meta . touched ? meta . error : '' } < / div > < / div > ) ; }
the error property is automatically added to the field object from our validate function
the error property is automatically added to the field object from our validate function