> Forums > Active Social > Themes and Templates > How to enforce a valid url?
Last Post 27 Oct 2010 10:51 PM by odove. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
odove
Customers
odove
Post Count:114

--
27 Oct 2010 06:27 PM
    For the url fields (facebook, twitter, etc), I got all kinds of input, most of them are not valid urls. But the pretty icons will always show up regardless.  How can I enforce it to be the right format?  I put some regular expression  stuff under "Manage Profile Properties" but didn't work.  
    Jeff Blanks
    Customers
    Jeff Blanks
    Post Count:387

    --
    27 Oct 2010 07:09 PM
    I hope this comes out right in the forums, if not, check the links for some others:

    (http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?

    Sources to have a look at for other good examples such as zip codes, phone numbers, email:

    blancer.com/tutorials/wp/16798/10-regular-expressions-for-efficient-web-development/

    msdn.microsoft.com/en-us/library/ff650303.aspx



    Edit: I've not tested against the "asURL" Data type yet.

    Cheers! Jeff
    @northeastok | @jeffblanks | My Blog
    odove
    Customers
    odove
    Post Count:114

    --
    27 Oct 2010 10:51 PM
    goBlanks,

    That worked. I don't know why there is no "asURL" data type available but I changed that into "Text" and it worked ok.

    Thank you for the help!
    You are not authorized to post a reply.
    > Forums > Active Social > Themes and Templates > How to enforce a valid url?
    test
    Copyright 2012 by DotNetNuke Corporation / Terms of Use / Privacy