Derek Hohls schrieb:
> I know the group does not directly offer support for Regular Expressions,
> but this is a "quick and simple" question that someone might know...
>  
> I need to check that a valid web address (grammatically correct anyway)
> is being entered in a form field.  I am trying to check for the address 
> starting with a valid prefix - the regexp I am using is:
> 
> pattern="^(http|https|ftp)://"

I'm using this in the form model definition:

<fd:field id="name" required="false">
  <fd:label>MyForm</fd:label>
  <fd:datatype base="string" />
  <fd:validation>
    <fd:regexp 
pattern="(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&amp;[EMAIL
 PROTECTED]/]))?">
      <fd:failmessage>Invalid URL</fd:failmessage>
    </fd:regexp>
  </fd:validation>
</fd:field>

HTH
Felix

> 
> but this only allows me to enter only the prefix; not any string starting with
> those characters, which is what I thought the ^ character would do?
> 
> Thanks
> Derek
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to