-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1132 from geoadmin/develop
New Release v1.48.0 - #minor
- Loading branch information
Showing
198 changed files
with
6,927 additions
and
3,260 deletions.
There are no files selected for viewing
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import ErrorMessage from '@/utils/ErrorMessage.class' | ||
|
||
export function getStandardErrorMessage(query, urlParamName) { | ||
return new ErrorMessage('url_parameter_error', { | ||
param: urlParamName, | ||
value: query, | ||
}) | ||
} | ||
|
||
/** | ||
* Return the standard feedback for most parameters given in the URL: if the query is validated, it | ||
* can proceed and be set in the store. | ||
* | ||
* @param {any} query The value of the URL parameter given | ||
* @param {Boolean} isValid Is the value valid or not | ||
* @returns | ||
*/ | ||
export function getStandardValidationResponse(query, isValid, urlParamName) { | ||
return { | ||
valid: isValid, | ||
errors: isValid ? null : [getStandardErrorMessage(query, urlParamName)], | ||
} | ||
} |
This file contains 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
Oops, something went wrong.