web/static/scripts/redisCommander.js
function validateInputAsJson() {
  if (this.value) {
    try {
      JSON.parse(this.value);
      setValidationClasses(this, true);
    }
    catch(e) {
      setValidationClasses(this, false);
    }
  }
  else {
    setValidationClasses(this, false)
  }
}
function validateInputAsJson() {
  if (this.value) {
    try {
      JSON.parse(this.value);
      setValidationClasses(this, true);
    }
    catch(e) {
      setValidationClasses(this, false);
    }
  }
  else {
    setValidationClasses(this, false)
  }
}
function validateInputAsJson ( ) { if ( this . value ) { try { JSON . parse ( this . value ) ; setValidationClasses ( this , true ) ; } catch ( e ) { setValidationClasses ( this , false ) ; } } else { setValidationClasses ( this , false ) } }
method to check if a input field contains valid json and set visual accordingly.
method to check if a input field contains valid json and set visual accordingly .