function isEmail(email) ''' Validate email address ''' Dim error, length, ValidationString, currentchar, i error = false ''' case no @ or no dot''' if not (instr(email,"@") > 0) or not (instr(email,".") > 0) then error = true ''' case no dot "." after strudel ''' elseif not instrrev(email,".") > instr(email,"@") then error = true ''' case @. ''' elseif instr(email,"@.") then error = true ''' case double @ ''' elseif instr(instr(email,"@") + 1,email,"@") > 0 then error = true ''' case start with @ ''' elseif left(email,1) = "@" then error = true ''' case ends with . ''' elseif right(email,1) = "." then error = true ''' case none valide chatacters ''' else ValidationString = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_@^.-" length = len(email) for i = 1 to length currentchar = left(right(email,i),1) if not instr(ValidationString ,currentchar) > 0 then error = true exit for end if next end if isEmail = not error end function