The allow_alphabets_only fn takes a &str and check that it
should only consist of alphabets. It will return false even
if one non-alphabetic char is found
The allow_alphanumeric_only fn takes a &str and check to see
that it should only consist of alpha-numerical chars.
The fn will return false even if one non-alpha-numerical char
is found.
The allow_numbers_only fn takes a &str and will check that it
should only consist of numerical chars.The fn will return
false even if one non-numeric char is found.
The alphabets_with_symbols fn will allow just alphabets and the
selected symbols e.g ! , @ etc.
It takes a &str (sample ) and another &str with allowed
symbols. It will return true only if the sample string has only
alphabets and the allowed symbols provided.
The no_caps function will return None even if a single Capital
character is found in the provided sample &str.
Any character other than a capital case alphabet is OK
We use this pub fn if we want to allow just numbers and few
selected symbols e.g ! , @ etc. It takes a &str
(the sample string) and another &str with allowed symbols.
It will return true only of the sample string has only
numbers and the allowed symbols provided.
The data presented to this function should be alphabatic
and in all caps. If any char found that is not a capital
alphabet the function will return false.
The sample &str should be entirely comprising of
ABCDEFGHIJKLMNOPQRSTUVWXYZ