Vessel Registry - Form Fields Logic and Validation

First Registry Request

Vessel Details

Vessel Specs

Field

Validation rules

Place of Build

Text, no validation

Year of Build

YYYY

Hull Identification Number

Alphanumeric, Must be unique

Vessel Type & Subdescriptor

Subdescriptor options will be based on the Vessel Type selected. See list of potential vessel types and subdescriptors attached to PBI Product Backlog Item 104829: Enter vessel details - Boards (azure.com)

Construction Type, Construction Material

Drop-down selectors based on matching LOV

Name of Builder

Text, no validation (for now - we may switch to Stakeholder selection later)

Propulsion type

Drop-down selector based on matching LOV

Propulsion power

Number, <10000? (might have to change this later - what’s a reasonable limit on HP?)
If propulsion type = non-propelled, then don’t capture propulsion power

Dimensions & Tonnage

The logic/validation for Dimensions and Tonnage depends on what is selected for Method of Tonnage Measurement

 

Assigned Formal Tonnage

Only display Length and Gross Tonnage

Field

Validation rules

Length

Validation - Numbers only; must be <12; support 2 decimal places (e.g. 11.24)

Gross Tonnage

For Assigned Formal Tonnage, Gross Tonnage field is read-only and the value populated is based on the value provided for Length

  • If length <8.5, then GT=4.99

  • If length >=8.5, but <10; then GT=9.99

  • If length >=10, but <12; then GT=14.99

 

Simplified Method of Tonnage Measurement

Display Length, Breadth, Depth, dropdown for Gross Tonnage Coefficient, and Gross Tonnage fields

Field

Validation rules

Length, Breadth, and Depth (L, B, D)

Validation - Numbers only, support 2 decimal places (e.g. 11.24)

Gross Tonnage Coefficient (GTC)

This is a dropdown with the following values:

  • 0.08

  • 0.16

  • 0.20

Gross Tonnage

This is read-only and calculated based on the fields previously entered:

L x B x D x GTC

Validation - If the calculated value exceeds 15, field is invalid and displays error: “Gross Tonnage cannot exceed 15”

Certificate of Survey

Logic is simple - User can enter Length, Breadth, Depth, Gross Tonnage. 100 max value for L/B/D, 15 for Gross Tonnage.

Ownership Details

Shares of Ownership

Shares of ownership is a complicated topic, and I encourage you to see the official explanation on the TC website.

For validation the simplest way to think of it is the shares apply to the sequence and not the owners. So the shares for all sequences should add up to 64. The shares are displayed for each owner in a sequence but that amount is “shared” between them.