Validation Rules - Logic

Pinesh

New member
Local time
Today, 12:38
Joined
Jan 3, 2018
Messages
10
Hi Forum Members

We are engaged in teaching ICT to students (IGCSE). Database management is a important subject for them. We teach this subject using MS Access Application.

The new generation of students ask a lot of logical questions and if these questions are left un-answered, they feel a little uncomfortable.

One of such question is about Validation Rules.

Question:-
=======
If the validation rule for "Should be any 4 characters only or
Should be 4 alphabets only" is Like “????” or
Like "[A-Z][A-Z][A-Z][A-Z]".....

Then for "Should only contain alphabets" - why is the validation rule "Not Like "*[!a-z]*"

(1) What is the reason for the rule to start with Not?
(2) What is the reason for wild card * as the criteria is clear that it should contain all alphabets only and no numbers etc - then why a wild card before and after [!a-z]
(3) What is the logic or reason for exclamation sign before [a-z]
(4) Conceptually - should the rule not be just "Like[a-z]"?

Need some expert help to throw some light on these logical questions if possible so that the current generation - students - logical minds can be satisfied!

Thanks in advance for the efforts and answers.
Regards / Pinesh Mehta
 
if i answer, can i get full scholarship?
1. Not meaning, to negate or inverse its value.
if the expression is True, it becomes False, vice versa.
2. the expression *[!a-z]*, means [!a-z], not alphabet
should be extended from the first character up to the
last character of the string being validated.
as you can see if the expression would have been
1[!a-z]23, it is explicitly saying that the 2nd char
should not be alphabet. on our case it is open-ended.
3.the exclamation inside [!a-z], is a negation.
meaning Not including a-z (not including the alphabet).
4. no, like [a-z] means only the first char is being tested.
and the length should only be 1.
 

Users who are viewing this thread

Back
Top Bottom