PrismaClientValidationError class

Prisma Client throws a PrismaClientValidationError exception if validation fails - for example:

  • Missing field - for example, an empty data: {} property when creating a new record
  • Incorrect field type provided (for example, setting a bool field to "Hello, I like cheese and gold!")
Inheritance

Constructors

PrismaClientValidationError.new({required String message, String clientVersion = version})
Create s a new PrismaClientValidationError.

Properties

clientVersion String
Version of Prisma client (for example, 4.4.0)
finalinherited
hashCode int
The hash code for this object.
no setterinherited
message String
Error message associated with error code
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
The stack trace at the point where this error was first thrown.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited