File tree Expand file tree Collapse file tree 5 files changed +33
-4
lines changed Expand file tree Collapse file tree 5 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -58,14 +58,14 @@ export function useUniqueNameValidation({
58
58
if ( alreadyExist ) {
59
59
setError ( name , {
60
60
type : 'validate' ,
61
- message : 'nameAlreadyUsed' ,
61
+ message : 'use-unique-name-validation/ nameAlreadyUsed' ,
62
62
} ) ;
63
63
}
64
64
} )
65
65
. catch ( ( ) => {
66
66
setError ( name , {
67
67
type : 'validate' ,
68
- message : 'nameValidityCheckErrorMsg' ,
68
+ message : 'use-unique-name-validation/ nameValidityCheckErrorMsg' ,
69
69
} ) ;
70
70
} )
71
71
. finally ( ( ) => {
@@ -104,14 +104,14 @@ export function useUniqueNameValidation({
104
104
clearErrors ( name ) ;
105
105
setError ( 'root.isValidating' , {
106
106
type : 'validate' ,
107
- message : 'cantSubmitWhileValidating' ,
107
+ message : 'use-unique-name-validation/ cantSubmitWhileValidating' ,
108
108
} ) ;
109
109
debouncedHandleCheckName ( trimmedValue ) ;
110
110
} else {
111
111
clearErrors ( 'root.isValidating' ) ;
112
112
setError ( name , {
113
113
type : 'validate' ,
114
- message : 'nameEmpty' ,
114
+ message : 'use-unique-name-validation/ nameEmpty' ,
115
115
} ) ;
116
116
}
117
117
} , [
Original file line number Diff line number Diff line change @@ -28,3 +28,4 @@ export * from './external/exportParamsEn';
28
28
export * from './external/importParamsEn' ;
29
29
export * from './componentsEn' ;
30
30
export * from './parameters' ;
31
+ export * from './use-unique-name-validation-en' ;
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (c) 2025, RTE (http://www.rte-france.com)
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+ */
7
+
8
+ export const useUniqueNameValidationEn = {
9
+ 'use-unique-name-validation/nameAlreadyUsed' : 'This name is already used' ,
10
+ 'use-unique-name-validation/nameValidityCheckErrorMsg' : 'Error while checking name validity' ,
11
+ 'use-unique-name-validation/cantSubmitWhileValidating' : 'Impossible to submit the form while validating a field' ,
12
+ 'use-unique-name-validation/nameEmpty' : 'The name is empty' ,
13
+ } ;
Original file line number Diff line number Diff line change @@ -28,3 +28,4 @@ export * from './external/exportParamsFr';
28
28
export * from './external/importParamsFr' ;
29
29
export * from './componentsFr' ;
30
30
export * from './parameters' ;
31
+ export * from './use-unique-name-validation-fr' ;
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (c) 2025, RTE (http://www.rte-france.com)
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+ */
7
+
8
+ export const useUniqueNameValidationFr = {
9
+ 'use-unique-name-validation/nameAlreadyUsed' : 'Ce nom est déjà utilisé' ,
10
+ 'use-unique-name-validation/nameValidityCheckErrorMsg' : 'Erreur lors de la vérification de la validité du nom' ,
11
+ 'use-unique-name-validation/cantSubmitWhileValidating' :
12
+ "Impossible de soumettre le formulaire durant la validation d'un champ" ,
13
+ 'use-unique-name-validation/nameEmpty' : 'Le nom est vide' ,
14
+ } ;
You can’t perform that action at this time.
0 commit comments