isValid (opts) {
    return !this._mapper().validate(this, opts)
  }
Return whether the record in its current state passes validation.

@example <caption>Record#isValid</caption>
const JSData = require('js-data');
const { Container } = JSData;
console.log('Using JSData v' + JSData.version.full);
const store = new Container();
store.defineMapper('user', {
  schema: {
    properties: {
      name: { type: 'string' }
    }
  }
});
const user = store.createRecord('user', {
  name: 1234
}, {
  noValidate: true // this allows us to put the record into an invalid state
});
console.log('user isValid: ' + user.isValid());
user.name = 'John';
console.log('user isValid: ' + user.isValid());

@method Record#isValid
@param {object} [opts] Configuration options. Passed to {@link Mapper#validate}.
@returns {boolean} Whether the record in its current state passes
validation.
@since 3.0.0