code: function isValid(attribute) {
    try {
      this.validate(attribute);
    } catch (e) {
      if (e instanceof errors.ValidationError) {
        return false;
      } else {
        throw e;
      }
    }
    return true;
  }
docs: Validates an entity and returns a boolean indicating if it is valid.
  @name module:back4app-entity/models.Entity#isValid
  @function
  @param {?string} [attribute] The name of the attribute to be validated. If no
  attribute is passed, all attributes will be validated.
  @returns {boolean} The validation result.
  @example
  myEntity.isValid('myAttribute'); // Validates attribute "myAttribute" of
  // Entity "myEntity" and returns true/false
  @example
  myEntity.isValid(); // Validates all attributes of "myEntity" and returns
  // true/false