Skip to content

Commit

Permalink
fix: business rules
Browse files Browse the repository at this point in the history
  • Loading branch information
collettemathieu committed Oct 14, 2024
1 parent c12202b commit 8477301
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "pathway-design-common-business-pathway-rules",
"$schema": "../../../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/pathway-design/common-business/pathway/rules/src",
"sourceRoot": "libs/pathway-design/common/business/pathway/rules/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:swc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/libs/pathway-design/common-business/pathway/rules",
"main": "libs/pathway-design/common-business/pathway/rules/src/index.ts",
"tsConfig": "libs/pathway-design/common-business/pathway/rules/tsconfig.lib.json",
"outputPath": "dist/libs/pathway-design/common/business/pathway/rules",
"main": "libs/pathway-design/common/business/pathway/rules/src/index.ts",
"tsConfig": "libs/pathway-design/common/business/pathway/rules/tsconfig.lib.json",
"assets": []
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export const PDCBPR_titleRules: Rules = {
textError: function () {
return `Renseigner un nom entre 1 et ${this.maxLength} caractères.`;
},
isValid: function (value: string | null) {
return value !== null && value.trim().length !== 0 && value.trim().length <= this.maxLength;
isValid: function (value: string | null | undefined) {
return value !== undefined && value !== null && value.trim().length !== 0 && value.trim().length <= this.maxLength;
},
isRequired: true,
maxLength: 100,
Expand Down

0 comments on commit 8477301

Please sign in to comment.