@defra/fcp-sfd-frontend-engine 0.31.2 → 0.32.0
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/dist/index.cjs
CHANGED
|
@@ -536,10 +536,10 @@ var businessLegalStatusSchema = Joi.object({
|
|
|
536
536
|
|
|
537
537
|
// src/schemas/business/business-charity-registration-number-schema.js
|
|
538
538
|
var businessCharityRegistrationNumberSchema = Joi.object({
|
|
539
|
-
charityCommissionRegistrationNumber: Joi.string().trim().required().pattern(/^\d{
|
|
539
|
+
charityCommissionRegistrationNumber: Joi.string().trim().required().pattern(/^\d{6,8}$/).messages({
|
|
540
540
|
"string.empty": "Enter the charity commission registration number",
|
|
541
541
|
"any.required": "Enter the charity commission registration number",
|
|
542
|
-
"string.pattern.base": "Charity commission registration number must be
|
|
542
|
+
"string.pattern.base": "Charity commission registration number must be 6 to 8 numbers",
|
|
543
543
|
"string.noControlChars": "Charity commission registration number must only include numbers"
|
|
544
544
|
})
|
|
545
545
|
});
|
package/dist/index.js
CHANGED
|
@@ -495,10 +495,10 @@ var businessLegalStatusSchema = Joi.object({
|
|
|
495
495
|
|
|
496
496
|
// src/schemas/business/business-charity-registration-number-schema.js
|
|
497
497
|
var businessCharityRegistrationNumberSchema = Joi.object({
|
|
498
|
-
charityCommissionRegistrationNumber: Joi.string().trim().required().pattern(/^\d{
|
|
498
|
+
charityCommissionRegistrationNumber: Joi.string().trim().required().pattern(/^\d{6,8}$/).messages({
|
|
499
499
|
"string.empty": "Enter the charity commission registration number",
|
|
500
500
|
"any.required": "Enter the charity commission registration number",
|
|
501
|
-
"string.pattern.base": "Charity commission registration number must be
|
|
501
|
+
"string.pattern.base": "Charity commission registration number must be 6 to 8 numbers",
|
|
502
502
|
"string.noControlChars": "Charity commission registration number must only include numbers"
|
|
503
503
|
})
|
|
504
504
|
});
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Joi } from '../../utils/joi.js'
|
|
2
2
|
|
|
3
|
-
// Charity Commission registration numbers are
|
|
3
|
+
// Charity Commission registration numbers are 6 to 8 digits (England and Wales)
|
|
4
4
|
export const businessCharityRegistrationNumberSchema = Joi.object({
|
|
5
5
|
charityCommissionRegistrationNumber: Joi.string()
|
|
6
6
|
.trim()
|
|
7
7
|
.required()
|
|
8
|
-
.pattern(/^\d{
|
|
8
|
+
.pattern(/^\d{6,8}$/)
|
|
9
9
|
.messages({
|
|
10
10
|
'string.empty': 'Enter the charity commission registration number',
|
|
11
11
|
'any.required': 'Enter the charity commission registration number',
|
|
12
|
-
'string.pattern.base': 'Charity commission registration number must be
|
|
12
|
+
'string.pattern.base': 'Charity commission registration number must be 6 to 8 numbers',
|
|
13
13
|
'string.noControlChars': 'Charity commission registration number must only include numbers'
|
|
14
14
|
})
|
|
15
15
|
})
|