Business Rules and Validations

3.7.5 Business Rules and Validations

  • Mandatory Fields:
    • Rule: All fields (Bot Profile Picture, Bot Prompt, Bot Nickname) are required to ensure a complete and consistent bot profile.
    • Validation: Users cannot save the bot profile unless all required fields are filled with valid data.
    • Error Handling: Display error messages for any missing or invalid fields, preventing the save action until resolved.
  • Bot Profile Picture Requirements:
    • Rule:
      • Type: Bot profile picture must be either an uploaded image or a selected predefined avatar.
      • File Validation: Uploaded images must be of supported file types (.jpg, .png, .gif) and not exceed 2 MB in size.
    • Validation:
      • Check the file type and size during the upload process.
      • Ensure that predefined avatars are correctly selected from the available options.
    • Error Handling:
      • If an invalid file type or size is uploaded, display an error message prompting the user to choose a valid image.
  • Bot Prompt Requirements:
    • Rule:
      • Content: Bot prompt must clearly define the bot’s behavior, tone, and interaction style.
      • Length: (If there are any length restrictions, specify them here.)
    • Validation:
      • Ensure that the prompt is not empty and adheres to any content guidelines.
    • Error Handling:
      • If the prompt is missing or does not meet content guidelines, display an error message prompting the user to provide a valid prompt.

Next

Leave a Reply

Your email address will not be published. Required fields are marked *