4. Validation
Validation is the process of checking data against a
standard or requirement.
The term is commonly used when:
ïChecking the information entered by a person when
storing data, sending information or using an online
service (FORM VALIDATION).
6. Our Project
ïIs a email validator, which
ïValidates an Email Address
ïCheck the grammar and syntax
ïCan be used in Data Entry forms and
Applications
10. Valid Email Address
ïThere's only one real answer to this:
ïA valid email address is one that you can send emails to
ïContemporary email addresses consist of a "local part"
separated from a "domain part" (a fully-qualified domain
name) by an at-sign ("@").
ïMymail@mycompany.com is a valid Email Address
11. Regular Expressions
ï If you only want to check if an address is grammatically
correct then you could use a regular expression
ï Using a regular expression that recognizes email addresses
could be useful in various situations:
For example
ïto scan for email addresses in a document,
ïto validate user input,
ïor as an integrity constraint on a data repository.
12. Regular Expressions
ïRegular expressions are a very cool feature for
pattern recognition in strings.
ïMathematically speaking regular expressions are
parsed through a "finite state machine".
ïAs the name implies, such a machine has only a
finite number of states, and it has no external
memory attached.
13. Parsing
ïParsing or syntactic analysis is the process of
analysing a string of symbols, either in natural
language or in computer languages,
according to the rules of a formal grammar.
14. Regular Expression Processor
ïA regular expression processor processes a regular
expression statement expressed in terms of a
grammar in a given formal language, and with
that examines the target text string, parsing it to
identify substrings that are members of its
language, the regular expressions.
16. Regular Expression for Email Validation
Myname@mycompany.com can be validated as
"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"
Myname
@
mycompany .
com
We compared the given email address with the upper RegEx to validate it is synthetically
correct or not.
17. Regular Expressions
Any validation problems that involve
recursion, option, limitation is easier
to solve with regular expressions than
using other ways (like if-else if-else,
while condition)
18. Regular Expressions
ïRegular Expressions can be used to
ïTest if a string matches some pattern.
ïScan for virus signatures.
ïProcess natural language.
ïSearch for information using Google.
ïSearch for markers in human genome
ïSearch-and-replace in a word processors.
ïValidate data-entry fields (dates, email, URL, credit card)
19. Email Address Standards
ïThere are acknowledged standards for what constitutes a valid
email address.
ïThese are defined in the Request For Comments documents (RFCs)
ïThe syntax of email addresses has been defined in various RFCs,
most notably RFC 822 and RFC 5322.
ïWe u s e d R F C 5 3 2 2 , a s t h i s i s t h e l a t e s t s t a n d a r d .