feat DF-527Add minimum precision validation for latitude and longitud…#235
Merged
feat DF-527Add minimum precision validation for latitude and longitud…#235
Conversation
…e fields - Updated LatLongField to enforce a minimum decimal precision of 1 for latitude and longitude inputs. - Added corresponding test cases to ensure proper validation behavior for minimum precision in both LatLongField and NumberField components.
…e fields - Updated Easting and Northing fields to allow for increased digit lengths (6 for Easting and 7 for Northing). - Added minLength and maxLength validations for Easting, Northing, Latitude, and Longitude fields. - Introduced new test cases to validate the updated length requirements for these fields.
dea64e8 to
822043d
Compare
|
davidjamesstone
approved these changes
Nov 4, 2025
jbarnsley10
reviewed
Nov 4, 2025
| 'number.precision': | ||
| '{{#label}} must have no more than 7 decimal places', | ||
| 'number.minPrecision': | ||
| '{{#label}} must have at least {{#minPrecision}} decimal place', |
Contributor
There was a problem hiding this comment.
Typo - 'place' -> 'places'
jbarnsley10
reviewed
Nov 4, 2025
| * @param maxLength - Maximum allowed string length | ||
| * @returns Object with validation result | ||
| */ | ||
| export function validateStringLength( |
Contributor
There was a problem hiding this comment.
Will Joi not validate minLength/maxLength/precision/length through its own methods? Do we need these custom-written methods here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



…e fields
Proposed change
Jira ticket:
Type of change
Checklist
README.mdanddocs/*(where appropriate, e.g. new features).npm run test).npm run lint).npm run format).