SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form Text Field - Require .mp3

    Hi There Everyone,

    I have a form text field that I want to validate to contain a certain set of text at the end.

    The field allows people to enter the URL of an MP3 file, so the field needs to check that the inputted text ends in ".mp3".

    If the field dosen't end in ".mp3" it should pop up a message saying something like "please check your field ends in .mp3 and try again".

    The field should also be required.

    Can someone please tell me how I would accomplish this?

    Thanks
    Zach

  2. #2
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had found this tutorial previously but wasn't entirely sure how to implement it.

    http://javascript.about.com/library/blvalid04.htm


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •