Forum Discussion

shravani's avatar
8 years ago

Validations used in Lithium for firstname, lastname and email.

Hi,

 

What are the validations used in lithium for firstname , lastname and email?

 

Thanks

3 Replies

  • shravani - In case you are using the Lithium registration, there are no validations on the First and Last name, these two not even mandatory fields. For email - it is a standard validation of an email, and is mandatory.

     

    It could be different in case you have the SSO. I hope this helps.

  • ChiaraS's avatar
    ChiaraS
    Lithium Alumni (Retired)
    8 years ago

    shravani for first and last name following is checked: string length between 0 and 30, no HTML.

    For email, has to be a string between 2 and 80, and be a valid email (regexp).

  • shravani's avatar
    shravani
    Guide
    8 years ago

    Hi,

    I am using an api to update the email

     http://funatic.stage.funko.com/restapi/vc/users/id/9/email/set?value=ss&restapi.session_key=-0_zbvOaW3q5z6JjbgnlR4PAM6VIXabJAd7y-DvwAwQ.&restapi.response_format=json

     

    Since the email is not valid it is throwing an error

     

    1. {
    2.    "response":
    3.    {
    4.        "status": "error",
    5.        "error":
    6.        {
    7.            "code": 100,
    8.            "message": "Sorry, we could not send the email at this time.

      Please wait a few minutes and try again."

    9.        }
    10.    }
    11. }

     

    But the value is updated in the database even though it is not valid which is "ss".

     

    Thanks