Validation

Checking whether a booking is valid

This is a big topic, to be expanded.

Many validations are controlled by Site Configuration items. You can also enable Start/Finish controls via Season Periods. Seasons also control when bookings open and whether there is a ballot period.

There may be customised validations (customisation is a small unit of software we call a “plugin” coded specifically for your club only). You can list your plugins and see what each one does.

One special plugin is bookingstage3validations. If present and enabled, it overrides validations on step 3 when making a booking. You can control whether email, postal address fields, mobile phone are required or not. You can allow any one of the 3 phone fields or require mobile specifically.

Default values for booking stage3 validations are:

'b_contactname' => ['required', 'Please enter a contact name for the booking'],
'b_address1' => ['required', 'Please enter the first line of your address'],
'b_city' => ['required', 'Please enter your postal city or town'],
'b_state' => ['required', 'Please enter your state'],
'b_postcode' => ['required', 'Please enter your postcode'],
'b_emailaddress' => ['email', 'Please enter a valid email address'],
'phone' => ['any', 'Please enter at least one phone number', ['b_mobilenumber', 'b_ahphonenumber', 'b_phonenumber']]

Some of the above validations (all except Contact Name) are carried over into the member database, but only if the member record has booking rights (set by their Member Class). In all other member records none of the above fields are compulsory.

To customise the above validations, contact CBDWeb to have your plugin created or adjusted.