Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Regular Expressions For a reference to be valid, the server-side should validate the reference to the same format as the client-side, plus the following additional

Regular Expressions

For a reference to be valid, the server-side should validate the reference to the same format as the client-side, plus the following additional constraints: the four letter group must be one of ACFT, ABQR, BXDE. Anything else is invalid. The next character must be a hyphen. Anything else is invalid.

The first digit may only be 1 or 2. The other digits may be any value between 0 and 9 inclusive.

My code below that needs help so it matches with what is asked above. Can i have help plz.

if (isset($webdata['bookingreference'] )) {

if (!preg_match("/^[a-z A-Z]{4}-[0-9]{5}$/",$webdata['bookingreference'])) {

$formerror['bookingreference'] = 'Not valid on server: invalid bookingreference format ';

//echo "invalid bookingreference format";

$valid = FALSE ;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Compare the current team to the ideal team.

Answered: 1 week ago

Question

Are the rules readily available?

Answered: 1 week ago

Question

Have ground rules been established for the team?

Answered: 1 week ago