Ask AI
Skip to main content

Set invalid message of url input field

Function: Set Invalid Message of URL Input Field

This action allows you to display a specific error message next to a URL input field on your application's screen. This is useful for guiding users when their input doesn't meet the required format or criteria, making your forms more user-friendly and robust.

Input,

  • UI element (Type: PART, specifically a URL input field): This is the specific URL input field on your form where you want to display the error message. This input is required.
  • Invalid message (Type: STRING): This is the custom text message that will appear next to the URL input field when it's considered invalid. If left empty, any existing invalid message will be cleared.

Output,

This action does not produce a direct output. Instead, it modifies the specified UI element by setting or clearing its invalid message.

Execution Flow,

Real-Life Examples,

Example 1: Guiding users to enter a valid website address

  • Inputs:
    • UI element: "Website URL Field"
    • Invalid message: "Please enter a valid website address, starting with http:// or https://"
  • Result: If a user types "mywebsite" into the "Website URL Field" and it's not a valid URL, the message "Please enter a valid website address, starting with http:// or https://" will appear next to the field, guiding them to correct their input.

Example 2: Clearing an error message after successful validation

  • Inputs:
    • UI element: "Company Website Link"
    • Invalid message: (Left empty)
  • Result: After a user has corrected an invalid URL in the "Company Website Link" field, and your application has validated it, this action can be used to clear any previously displayed error message, indicating that the input is now valid.

Example 3: Notifying about a broken link

  • Inputs:
    • UI element: "Product Image URL"
    • Invalid message: "This image URL appears to be broken. Please check the link."
  • Result: If your application performs an external check and finds that the URL entered in the "Product Image URL" field leads to a broken link, this action can display the message "This image URL appears to be broken. Please check the link." to the user.