processData(propertyMetaData, formObj) {
    const { history, putResource, checkValidation, url } = this.props;
    // if obj is non-empty, show error
    const failedFields = checkValidation(propertyMetaData, formObj);
    const keys = Object.keys(failedFields);
    if (keys.length) {
      this.setInvalidFieldObj(failedFields);
      this.showError('error from update: ' +
        keys.join(', ') + ' failed validation');
    } else {
      // all fields are valid
      this.setInvalidFieldObj({});
      // go to details page
      putResource(formObj, url, (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
   */
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
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
processData(propertyMetaData, formObj) {
    const { history, putResource, checkValidation, url } = this.props;
    const failedFields = checkValidation(propertyMetaData, formObj);
    const keys = Object.keys(failedFields);
    if (keys.length) {
      this.setInvalidFieldObj(failedFields);
      this.showError('error from update: ' +
        keys.join(', ') + ' failed validation');
    } else {
      this.setInvalidFieldObj({});
      putResource(formObj, url, (redirectUrl) => {
        history.push(redirectUrl);
      });
    }
  }
processData ( propertyMetaData , formObj ) { const { history , putResource , checkValidation , url } = this . props ; const failedFields = checkValidation ( propertyMetaData , formObj ) ; const keys = Object . keys ( failedFields ) ; if ( keys . length ) { this . setInvalidFieldObj ( failedFields ) ; this . showError ( 'error from update: ' + keys . join ( ', ' ) + ' failed validation' ) ; } else { this . setInvalidFieldObj ( { } ) ; putResource ( formObj , url , ( 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
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
// if obj is non-empty, show error // all fields are valid // go to details page