Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: how do I check a mail-adres?

Re: how do I check a mail-adres?

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Fri, 16 Apr 2004 21:25:46 -0700
Message-ID: <1082175936.21332@yasure>


Kris wrote:

> Hello,
>
> I would like to check the input of a mailadress in a textbox in Oracle
> (forms).
>
> When the adress is INCORRECT then I would like to raise an error but I don't
> know how I can check that adress.
>
> Is there anyone who can help me?
>
> Define "incorrect".
> -----------------
>
> It should be
>
> mailadress : blablabla_at_blabla.com
>
> and NOT
>
> mailadress : 341eo///no§§^^eçunhiebvevebhvebv
>
>
> The adress must NOT be an excisting one but it should be build up like a
> correct one, with the right characters etc.
>
> Not starting with a number
> No ; , ? : / = + etc
> ther must be a @
> etc
> etc
> etc
>
> how can I check this?
>
> Thx in advance.

x := 'somepossibleemail_at_address'
y := TRANSLATE(x, '@;,?:/=+', '@');
if x <> y then ... it doesn't qualify
if instr(x, '@') = 0 it doesn't qualify
if instr(x, '.') = 0 it doesn't qualify

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Fri Apr 16 2004 - 23:25:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US