ask-and-trust - v1.0.0
    Preparing search index...

    Represents user input for creating a new user (SIGN UP). This class is used to validate the data before storing it in the database.

    • email: the user's email address, must be valid.
    • password: the user's password, with specific requirements:
      • Must be between 6 and 255 characters.
      • Must contain at least one uppercase letter, one lowercase letter, one number, and one symbol.
    • firstname: the user's first name, must be between 2 and 100 characters.
    • lastname: the user's last name, must be between 2 and 100 characters.
    • role: the user's role, must be one of the valid roles defined in the Roles enum.

    The class uses the following decorators:

    • @Field(): exposes the property in the GraphQL schema (via type-graphql).
    • @IsEmail(): ensures the email is valid.
    • @IsStrongPassword(): ensures the password meets strong security requirements.
    • @Length(): ensures the string length is within the specified bounds.
    • @IsIn(): ensures the role is a valid role as defined in the Roles enum.
    Index

    Constructors

    Properties

    email: string
    firstname: string
    lastname: string
    password: string