processData(propertyMetaData, formObj, goToUrl) {
    const { history, postResource, checkValidation } = this.props;
    // if array contains fields, show error
    const failedFields = checkValidation(propertyMetaData, formObj);
    const keys = Object.keys(failedFields);
    if (keys.length) {
      this.setIinvalidFieldObj(failedFields);
      this.showError('error from create: ' +
        keys.join(', ') + ' failed validation');
    } else {
      // all fields valid
      this.setIinvalidFieldObj({});
      // go to details page
      postResource(formObj, goToUrl, (redirectUrl) => {
        history.push(redirectUrl);
      });
    }
  }
/**
   * Validates form data with regexp from config
   * If validation passes, post formObj
   * else update error state with fields that failed validation
   * @param {Array} propertyMetaData Contains data validation
   * @param {Object} formObj JSON object with all postable data from form
   * @param {String} goToUrl The url to redirect to
   */
Validates form data with regexp from config
If validation passes, post formObj
else update error state with fields that failed validation
@param {Array} propertyMetaData Contains data validation
@param {Object} formObj JSON object with all postable data from form
@param {String} goToUrl The url to redirect to
Validates form data with regexp from config If validation passes post formObj else update error state with fields that failed validation @param { Array } propertyMetaData Contains data validation @param { Object } formObj JSON object with all postable data from form @param { String } goToUrl The url to redirect to
processData(propertyMetaData, formObj, goToUrl) {
    const { history, postResource, checkValidation } = this.props;
    const failedFields = checkValidation(propertyMetaData, formObj);
    const keys = Object.keys(failedFields);
    if (keys.length) {
      this.setIinvalidFieldObj(failedFields);
      this.showError('error from create: ' +
        keys.join(', ') + ' failed validation');
    } else {
      this.setIinvalidFieldObj({});
      postResource(formObj, goToUrl, (redirectUrl) => {
        history.push(redirectUrl);
      });
    }
  }
processData ( propertyMetaData , formObj , goToUrl ) { const { history , postResource , checkValidation } = this . props ; const failedFields = checkValidation ( propertyMetaData , formObj ) ; const keys = Object . keys ( failedFields ) ; if ( keys . length ) { this . setIinvalidFieldObj ( failedFields ) ; this . showError ( 'error from create: ' + keys . join ( ', ' ) + ' failed validation' ) ; } else { this . setIinvalidFieldObj ( { } ) ; postResource ( formObj , goToUrl , ( redirectUrl ) => { history . push ( redirectUrl ) ; } ) ; } }
Validates form data with regexp from config
 If validation passes, post formObj
 else update error state with fields that failed validation
 @param {Array} propertyMetaData Contains data validation
 @param {Object} formObj JSON object with all postable data from form
 @param {String} goToUrl The url to redirect to
Validates form data with regexp from config If validation passes post formObj else update error state with fields that failed validation @param { Array } propertyMetaData Contains data validation @param { Object } formObj JSON object with all postable data from form @param { String } goToUrl The url to redirect to
// if array contains fields, show error // all fields valid // go to details page