[Abstract]
[Introduction]
[Methods]
[Discussion]
[References]
Figure 2.
The class "valids" - an example of the use of some of it's methods.
1. The class instance is invoked.
2. Ensuring that there is no attempt to invoke a shell.
3. Checking an item contains only ASCII128 characters.
4. Checking an item is numeric.
5. Checking an email address. The return value implies
that the syntax is allright but the country domain does not exist.
6. Checking a nucleic acid (DNA) sequence.The return
value implies the sequence contains an ambigous character wich is
permitted in sequences only in special cases.
Written by Benny shomer, The EBI.
bshomer@ebi.ac.uk
1.
>>> from validations import valids
>>> v = valids()
2.
>>> v.safe('!#rm *')
'#rm *'
3.
>>> v.is_text('This is a text')
1
4.
>>> v.is_numeric('number 69')
0
5.
>>> v.is_email('bshomer@ebi.ac.zz')
2
6.
>>> v.is_na_sequence('actaacggatacnnacagt')
2