Skip to content

ValidationError: The CarDriver instance is not valid. Details: email is invalid (value: "bond@gmail.com") #1803

Description

@gholias

I a have a class that inherits from the Loopback user class.

I started getting an error this morning after I update to the latest version.

ValidationError: The `CarDriver` instance is not valid. Details: `email` is invalid (value: "bond@gmail.com")

Is there anything Im missing?

This is my CarDrive model definition


    {
      "name": "CarDrive",
      "base": "User",
      "idInjection": true,
      "options": {
        "validateUpsert": true
      },
      "properties": {
        "fullName": {
          "type": "string",
          "required": true
        },
        "firstName": {
          "type": "string",
          "required": true
        },
        "lastName": {
          "type": "string",
          "required": true
        },
        "email": {
          "type": "string",
          "required": true
        },
        "telephone": {
          "type": "string",
          "required": true
        },
        "realm": false,
        "driverPDF": {
          "type": "Text",
          "required": true,
            "oracle":{
                "dataType":"LONG"
            }
        },
        "UUID": {
          "type": "string",
          "required": true
        },
        "age": {
          "type": "number",
          "required": true
        },
        "status": {
          "type": "boolean",
          "required": true
        },
        "optOut": {
          "type": "boolean",
          "required": true
        }
      },
      "validations": [],
      "relations": {
        "accessTokens": {
          "type": "hasMany",
          "model": "accessToken",
          "foreignKey": "userId"
        }
      },
      "acls": [
        {
          "accessType": "EXECUTE",
          "principalType": "ROLE",
          "principalId": "$everyone",
          "permission": "ALLOW",
          "property": "create"
        },
        {
          "accessType": "EXECUTE",
          "principalType": "ROLE",
          "principalId": "$authenticated",
          "permission": "ALLOW",
          "property": "leave"
        },
          {
              "accessType": "EXECUTE",
              "principalType": "ROLE",
              "principalId": "$authenticated",
              "permission": "ALLOW",
              "property": "optout"
          }
      ],
      "methods": {}
    }

I appreciate any help

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions