Skip to content

ValidationError: The CarDriver instance is not valid. Details: email is invalid (value: "[email protected]") #1803

@gholias

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: "[email protected]")

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

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