Tuesday, June 30, 2009

Simple e-mail validation function

Nice and very simple pl/sql e-mail validation function from: http://forums.devshed.com/

if owa_pattern.match('email.address@server.com', '^.+@{1}\w+\.{1}\w{2,3}$') then
/*matches*/
else
/*not matches*/
end if;

Just create validation function returning boolean:

declare
begin
return
owa_pattern.match(:P27_EMAIL, '^.+@{1}\w+\.{1}\w{2,3}$');
end;

No comments:

Post a Comment