I have an input textbox, where I take user's URL for callback. I have allowed only certain characters in URL for security purpose.

I want to tell use about these allowed characters, but I am not getting any proper way to do so. As you can see in the image having comma separated characters in not properly visible and understandable.

enter image description here

Any suggestions, how I can show this to user.

Thanks in advance :)

P.S. : I am new to this site, so had confusions about tags. Please correct, if any re-tag needed.

  • Will these requirements prevent common URLs from being used? Because the user probably has a particular URL and can't just select a different one.
    – user31143
    Jun 7, 2016 at 11:08
  • no, all the common urls are allowed by this rule. there is one rule, like to not allow double dots in url, which is used for penetration, and we have not allowed @ and similar special characters which can cause security issues.
    – kadamb
    Jun 7, 2016 at 11:13
  • but your question appears to disallow ? which is common. As are characters like a space or +.
    – user31143
    Jun 7, 2016 at 11:14
  • @dan1111 : please give example
    – kadamb
    Jun 7, 2016 at 11:15
  • @dan1111 : ? is allowed, but + is not allowed because + is used in parameters and not URL and I can allow + as well
    – kadamb
    Jun 7, 2016 at 11:18

3 Answers 3


This is the design I used for showing allowed characters : enter image description here

  • This is a nice way to break it up, if the screen is too small you can wrap the individual blocks under, You're still missing the ? though.
    – DasBeasto
    Jun 8, 2016 at 14:52
  • 1
    A combination of this and @Kristiyan Lukanov's answer seems like it's the right approach. A combined inline validation with a well formatted educational prompt. "The character '\' is not allowed. Allowed characters are: etc etc etc"
    – dennislees
    Jun 8, 2016 at 15:33

Use inline validation when the user enters the url:

enter image description here

You don't need to clutter the interface with massages. Only show this message when they've encountered the error. Also, you can show the characters that are not allowed instead of those that are allowed because it is evident for most of them.

Characters like / ! @ , | are not allowed due to security issues

  • When the list of allowed characters is so short, and user has no idea of the correct list, adding a simple prompt will result in a better experience than a possible loop of trial and (validated) error.
    – dennislees
    Jun 8, 2016 at 15:30

If you have a feature to input the user's URL, you need to make sure it accepts any reasonable input.

Disallowing valid, common URLs for security reasons is not going to be a good approach (from the question it appears that a URL with a ? is not allowed, which isn't acceptable in my view). Because this isn't something a user can just change.

You will need a different approach to security, in my opinion. While this is off-topic for UX, there are some good answers at this Stack Overflow question.

Given the above, if you allow any "normal" URLs, there is no reason to warn ahead of time about requirements.

In the unlikely event that a user enters a disallowed URL, you can just give an error after the form is submitted.

  • sorry, my mistake, question mark is allowed.
    – kadamb
    Jun 7, 2016 at 11:16
  • but this is not solution to my problem @dan1111
    – kadamb
    Jun 7, 2016 at 12:16
  • @kadamb it is valid for answers to challenge the premise of the question. Of course you don't have to agree with my position.
    – user31143
    Jun 7, 2016 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.