Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have created a client side validation of $format = /^[a-zA-Z]{3}-[0-9]{6}/; This is to validate a booking reference such as ABC-123456. I must now create

I have created a client side validation of $format = "/^[a-zA-Z]{3}-[0-9]{6}/"; This is to validate a booking reference such as ABC-123456.

I must now create a server side validation. The initial 3 letters ust be either 'ACF', 'ABQ' or 'BXD'. The next character is again a hyphen '-'. The 6 numbers allowed must beging with either a 6 or a 9. Below is the question requirements:

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 three letter group must be one of ACF, ABQ, BXD. Anything else is invalid.

The next character must be a hyphen. Anything else is invalid.

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

Could you please assist with the code for this?

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions

Question

Find all zeros of f(x) = x 3 + 5x 2 - 8x + 2.

Answered: 1 week ago