Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check Too: Update validation messages #777

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/filters/validationMessageLookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ const validationMessages = {
fileNameInvalidCharacters: 'The selected file name must not contain any of the following characters: / \\ : * ? " < > |',
fileNameDoubleExtension: 'The selected file name must not contain two file extensions',
mimeType: 'The selected file must be a CSV, GeoJSON, GML or GeoPackage file',
mimeTypeMalformed: 'The selected file has a malformed mime type'
mimeTypeMalformed: 'The selected file has a malformed mime type and is not recognised. Try creating a new version and uploading again, or contact your server administrator for support'
},
url: {
required: 'Enter a URL',
format: 'Enter a valid URL',
length: 'The URL must be less than 2048 characters',
exists: 'The URL does not exist',
exists: 'The URL does not exist. Check the URL you\'ve entered is correct',
filetype: 'The file referenced by URL must be a CSV, GeoJSON, GML or GeoPackage file',
size: 'The file referenced by URL must be smaller than 100MB'
},
validationResult: {
required: 'Unable to contact the API'
required: 'Sorry, there is a problem with the service. Try again later'
},
name: {
required: 'Enter your full name'
Expand All @@ -47,7 +47,7 @@ const validationMessages = {
},
'endpoint-url': {
required: 'Enter an endpoint URL',
format: 'Enter a valid endpoint URL',
format: 'Endpoint URL must start with http:// or https://, have no spaces or unusual characters like { } [ ]',
maxlength: 'The URL must be less than 2048 characters'
},
'documentation-url': {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/dataset-details.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe(`dataset details View (seed: ${seed})`, () => {
params,
fieldId: 'endpoint-url',
fieldType: 'format',
message: 'Enter a valid endpoint URL'
message: 'Endpoint URL must start with http:// or https://, have no spaces or unusual characters like { } [ ]'
})
)

Expand Down
Loading