@ciwergrp/nuxid 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/console/request.mjs +2 -8
- package/dist/module.json +1 -1
- package/package.json +1 -1
package/console/request.mjs
CHANGED
|
@@ -73,10 +73,7 @@ function getTemplate(name, definitions) {
|
|
|
73
73
|
.map(([field, rules]) => ` ${field}: [${rules.map(r => `'${r}'`).join(', ')}],`)
|
|
74
74
|
.join('\n');
|
|
75
75
|
|
|
76
|
-
return `
|
|
77
|
-
import { createValidationRules } from 'nuxid' // Adjust this import path if needed
|
|
78
|
-
// import { useI18n } from 'vue-i18n' // Uncomment if you use i18n
|
|
79
|
-
|
|
76
|
+
return `
|
|
80
77
|
/**
|
|
81
78
|
* Validation rules for the ${name} request.
|
|
82
79
|
*
|
|
@@ -84,8 +81,6 @@ import { createValidationRules } from 'nuxid' // Adjust this import path if need
|
|
|
84
81
|
* @returns A fully compatible Element Plus FormRules object.
|
|
85
82
|
*/
|
|
86
83
|
export function ${name}Request(form: Record<string, any>) {
|
|
87
|
-
// const { t } = useI18n() // Uncomment if you use i18n
|
|
88
|
-
|
|
89
84
|
/**
|
|
90
85
|
* The validation rules for the request.
|
|
91
86
|
*/
|
|
@@ -93,7 +88,6 @@ export function ${name}Request(form: Record<string, any>) {
|
|
|
93
88
|
${definitionsString}
|
|
94
89
|
|
|
95
90
|
}
|
|
96
|
-
|
|
97
91
|
/**
|
|
98
92
|
* The validation options.
|
|
99
93
|
*/
|
|
@@ -124,7 +118,7 @@ ${definitionsString}
|
|
|
124
118
|
* data.email = data.email.trim().toLowerCase()
|
|
125
119
|
* return data
|
|
126
120
|
*/
|
|
127
|
-
prepareForValidation: (data) => {
|
|
121
|
+
prepareForValidation: (data: Record<string, any>) => {
|
|
128
122
|
return data
|
|
129
123
|
},
|
|
130
124
|
|
package/dist/module.json
CHANGED