Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 92cb74da by Tony Chemit at 2024-09-20T12:10:59+02:00 Update validation model - See #2818 - - - - - 9 changed files: - core/api/validation/src/main/filtered-resources/META-INF/validation/mapping.json - − core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/EngineMakeDto-create-error-validation.xml - − core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/EngineMakeDto-create-warning-validation.xml - − core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/EngineMakeDto-update-error-validation.xml - − core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/EngineMakeDto-update-warning-validation.xml - − core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/HullMaterialDto-create-error-validation.xml - − core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/HullMaterialDto-create-warning-validation.xml - − core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/HullMaterialDto-update-error-validation.xml - − core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/HullMaterialDto-update-warning-validation.xml Changes: ===================================== core/api/validation/src/main/filtered-resources/META-INF/validation/mapping.json ===================================== @@ -331,6 +331,10 @@ "fr.ird.observe.dto.referential.common.DataQualityDto-create-warning": "fr.ird.observe.dto.referential.common.DataQualityDtoValidatorOnCreateForWarning", "fr.ird.observe.dto.referential.common.DataQualityDto-update-error": "fr.ird.observe.dto.referential.common.DataQualityDtoValidatorOnUpdateForError", "fr.ird.observe.dto.referential.common.DataQualityDto-update-warning": "fr.ird.observe.dto.referential.common.DataQualityDtoValidatorOnUpdateForWarning", + "fr.ird.observe.dto.referential.common.EngineMakeDto-create-error": "fr.ird.observe.dto.referential.common.EngineMakeDtoValidatorOnCreateForError", + "fr.ird.observe.dto.referential.common.EngineMakeDto-create-warning": "fr.ird.observe.dto.referential.common.EngineMakeDtoValidatorOnCreateForWarning", + "fr.ird.observe.dto.referential.common.EngineMakeDto-update-error": "fr.ird.observe.dto.referential.common.EngineMakeDtoValidatorOnUpdateForError", + "fr.ird.observe.dto.referential.common.EngineMakeDto-update-warning": "fr.ird.observe.dto.referential.common.EngineMakeDtoValidatorOnUpdateForWarning", "fr.ird.observe.dto.referential.common.FpaZoneDto-create-error": "fr.ird.observe.dto.referential.common.FpaZoneDtoValidatorOnCreateForError", "fr.ird.observe.dto.referential.common.FpaZoneDto-create-warning": "fr.ird.observe.dto.referential.common.FpaZoneDtoValidatorOnCreateForWarning", "fr.ird.observe.dto.referential.common.FpaZoneDto-update-error": "fr.ird.observe.dto.referential.common.FpaZoneDtoValidatorOnUpdateForError", @@ -355,6 +359,10 @@ "fr.ird.observe.dto.referential.common.HarbourDto-create-warning": "fr.ird.observe.dto.referential.common.HarbourDtoValidatorOnCreateForWarning", "fr.ird.observe.dto.referential.common.HarbourDto-update-error": "fr.ird.observe.dto.referential.common.HarbourDtoValidatorOnUpdateForError", "fr.ird.observe.dto.referential.common.HarbourDto-update-warning": "fr.ird.observe.dto.referential.common.HarbourDtoValidatorOnUpdateForWarning", + "fr.ird.observe.dto.referential.common.HullMaterialDto-create-error": "fr.ird.observe.dto.referential.common.HullMaterialDtoValidatorOnCreateForError", + "fr.ird.observe.dto.referential.common.HullMaterialDto-create-warning": "fr.ird.observe.dto.referential.common.HullMaterialDtoValidatorOnCreateForWarning", + "fr.ird.observe.dto.referential.common.HullMaterialDto-update-error": "fr.ird.observe.dto.referential.common.HullMaterialDtoValidatorOnUpdateForError", + "fr.ird.observe.dto.referential.common.HullMaterialDto-update-warning": "fr.ird.observe.dto.referential.common.HullMaterialDtoValidatorOnUpdateForWarning", "fr.ird.observe.dto.referential.common.LengthLengthParameterDto-create-error": "fr.ird.observe.dto.referential.common.LengthLengthParameterDtoValidatorOnCreateForError", "fr.ird.observe.dto.referential.common.LengthLengthParameterDto-create-warning": "fr.ird.observe.dto.referential.common.LengthLengthParameterDtoValidatorOnCreateForWarning", "fr.ird.observe.dto.referential.common.LengthLengthParameterDto-update-error": "fr.ird.observe.dto.referential.common.LengthLengthParameterDtoValidatorOnUpdateForError", ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/EngineMakeDto-create-error-validation.xml deleted ===================================== @@ -1,139 +0,0 @@ -<!-- - #%L - ObServe Core :: API :: Validation - %% - Copyright (C) 2008 - 2024 IRD, Ultreia.io - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//Apache Struts//XWork Validator 1.0.3//EN" - "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> -<validators> - - <field name="code"> - <!-- code is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- code (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- code should be unique --> - <field-validator type="referentialUniqueField" short-circuit="true"> - <message/> - </field-validator> - </field> - - <field name="homeId"> - <!-- homeId (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- homeId should be unique --> - <field-validator type="referentialUniqueField" short-circuit="true"> - <message/> - </field-validator> - </field> - - <field name="label1"> - <!-- label1 is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- label1 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label2"> - <!-- label2 is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- label2 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label3"> - <!-- label3 is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- label3 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label4"> - <!-- label4 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label5"> - <!-- label5 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label6"> - <!-- label6 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label7"> - <!-- label7 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label8"> - <!-- label8 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="uri"> - <!-- uri (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- uri should be unique --> - <field-validator type="referentialUniqueField" short-circuit="true"> - <message/> - </field-validator> - </field> - -</validators> ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/EngineMakeDto-create-warning-validation.xml deleted ===================================== @@ -1,74 +0,0 @@ -<!-- - #%L - ObServe Core :: API :: Validation - %% - Copyright (C) 2008 - 2024 IRD, Ultreia.io - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//Apache Struts//XWork Validator 1.0.3//EN" - "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> -<validators> - - <field name="label1"> - <!-- label1 is not translated --> - <field-validator type="fieldexpression"> - <param name="expression"> - <![CDATA[ isLabelTranslated(label1, label2, label3) ]]> - </param> - <message>observe.referential.Referential.validation.label1.untranslated</message> - </field-validator> - </field> - - <field name="label2"> - <!-- label2 is not translated --> - <field-validator type="fieldexpression"> - <param name="expression"> - <![CDATA[ isLabelTranslated(label2, null, null) ]]> - </param> - <message>observe.referential.Referential.validation.label2.untranslated</message> - </field-validator> - </field> - - <field name="label3"> - <!-- label3 is not translated --> - <field-validator type="fieldexpression"> - <param name="expression"> - <![CDATA[ isLabelTranslated(label3, label1, label2) ]]> - </param> - <message>observe.referential.Referential.validation.label3.untranslated</message> - </field-validator> - </field> - - <field name="status"> - <!-- referential is enabled --> - <field-validator type="fieldexpression" short-circuit="true"> - <param name="expression"> - <![CDATA[ enabled ]]> - </param> - <message>observe.referential.Referential.validation.disabled</message> - </field-validator> - </field> - - <field name="uri"> - <!-- uri string should be filled --> - <field-validator type="stringNotFilled"> - <message/> - </field-validator> - </field> - -</validators> ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/EngineMakeDto-update-error-validation.xml deleted ===================================== @@ -1,139 +0,0 @@ -<!-- - #%L - ObServe Core :: API :: Validation - %% - Copyright (C) 2008 - 2024 IRD, Ultreia.io - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//Apache Struts//XWork Validator 1.0.3//EN" - "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> -<validators> - - <field name="code"> - <!-- code is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- code (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- code should be unique --> - <field-validator type="referentialUniqueField" short-circuit="true"> - <message/> - </field-validator> - </field> - - <field name="homeId"> - <!-- homeId (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- homeId should be unique --> - <field-validator type="referentialUniqueField" short-circuit="true"> - <message/> - </field-validator> - </field> - - <field name="label1"> - <!-- label1 is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- label1 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label2"> - <!-- label2 is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- label2 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label3"> - <!-- label3 is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- label3 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label4"> - <!-- label4 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label5"> - <!-- label5 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label6"> - <!-- label6 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label7"> - <!-- label7 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label8"> - <!-- label8 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="uri"> - <!-- uri (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- uri should be unique --> - <field-validator type="referentialUniqueField" short-circuit="true"> - <message/> - </field-validator> - </field> - -</validators> ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/EngineMakeDto-update-warning-validation.xml deleted ===================================== @@ -1,74 +0,0 @@ -<!-- - #%L - ObServe Core :: API :: Validation - %% - Copyright (C) 2008 - 2024 IRD, Ultreia.io - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//Apache Struts//XWork Validator 1.0.3//EN" - "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> -<validators> - - <field name="label1"> - <!-- label1 is not translated --> - <field-validator type="fieldexpression"> - <param name="expression"> - <![CDATA[ isLabelTranslated(label1, label2, label3) ]]> - </param> - <message>observe.referential.Referential.validation.label1.untranslated</message> - </field-validator> - </field> - - <field name="label2"> - <!-- label2 is not translated --> - <field-validator type="fieldexpression"> - <param name="expression"> - <![CDATA[ isLabelTranslated(label2, null, null) ]]> - </param> - <message>observe.referential.Referential.validation.label2.untranslated</message> - </field-validator> - </field> - - <field name="label3"> - <!-- label3 is not translated --> - <field-validator type="fieldexpression"> - <param name="expression"> - <![CDATA[ isLabelTranslated(label3, label1, label2) ]]> - </param> - <message>observe.referential.Referential.validation.label3.untranslated</message> - </field-validator> - </field> - - <field name="status"> - <!-- referential is enabled--> - <field-validator type="fieldexpression" short-circuit="true"> - <param name="expression"> - <![CDATA[ enabled ]]> - </param> - <message>observe.referential.Referential.validation.disabled</message> - </field-validator> - </field> - - <field name="uri"> - <!-- uri string should be filled --> - <field-validator type="stringNotFilled"> - <message/> - </field-validator> - </field> - -</validators> ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/HullMaterialDto-create-error-validation.xml deleted ===================================== @@ -1,165 +0,0 @@ -<!-- - #%L - ObServe Core :: API :: Validation - %% - Copyright (C) 2008 - 2024 IRD, Ultreia.io - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//Apache Struts//XWork Validator 1.0.3//EN" - "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> -<validators> - - <field name="code"> - <!-- code is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- code (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- code should be unique --> - <field-validator type="referentialUniqueField" short-circuit="true"> - <message/> - </field-validator> - </field> - - <field name="comment"> - <!-- comment (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- comment length <= 512 --> - <field-validator type="stringMaxLength"> - <param name="maxLength">512</param> - <message/> - </field-validator> - </field> - - <field name="homeId"> - <!-- homeId (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- homeId should be unique --> - <field-validator type="referentialUniqueField" short-circuit="true"> - <message/> - </field-validator> - </field> - - <field name="label1"> - <!-- label1 is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- label1 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label2"> - <!-- label2 is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- label2 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label3"> - <!-- label3 is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- label3 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label4"> - <!-- label4 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label5"> - <!-- label5 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label6"> - <!-- label6 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label7"> - <!-- label7 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label8"> - <!-- label8 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="source"> - <!-- source (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- source length <= 512 --> - <field-validator type="stringMaxLength"> - <param name="maxLength">512</param> - <message/> - </field-validator> - </field> - - <field name="uri"> - <!-- uri (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- uri should be unique --> - <field-validator type="referentialUniqueField" short-circuit="true"> - <message/> - </field-validator> - </field> - -</validators> ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/HullMaterialDto-create-warning-validation.xml deleted ===================================== @@ -1,74 +0,0 @@ -<!-- - #%L - ObServe Core :: API :: Validation - %% - Copyright (C) 2008 - 2024 IRD, Ultreia.io - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//Apache Struts//XWork Validator 1.0.3//EN" - "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> -<validators> - - <field name="label1"> - <!-- label1 is not translated --> - <field-validator type="fieldexpression"> - <param name="expression"> - <![CDATA[ isLabelTranslated(label1, label2, label3) ]]> - </param> - <message>observe.referential.Referential.validation.label1.untranslated</message> - </field-validator> - </field> - - <field name="label2"> - <!-- label2 is not translated --> - <field-validator type="fieldexpression"> - <param name="expression"> - <![CDATA[ isLabelTranslated(label2, null, null) ]]> - </param> - <message>observe.referential.Referential.validation.label2.untranslated</message> - </field-validator> - </field> - - <field name="label3"> - <!-- label3 is not translated --> - <field-validator type="fieldexpression"> - <param name="expression"> - <![CDATA[ isLabelTranslated(label3, label1, label2) ]]> - </param> - <message>observe.referential.Referential.validation.label3.untranslated</message> - </field-validator> - </field> - - <field name="status"> - <!-- referential is enabled --> - <field-validator type="fieldexpression" short-circuit="true"> - <param name="expression"> - <![CDATA[ enabled ]]> - </param> - <message>observe.referential.Referential.validation.disabled</message> - </field-validator> - </field> - - <field name="uri"> - <!-- uri string should be filled --> - <field-validator type="stringNotFilled"> - <message/> - </field-validator> - </field> - -</validators> ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/HullMaterialDto-update-error-validation.xml deleted ===================================== @@ -1,165 +0,0 @@ -<!-- - #%L - ObServe Core :: API :: Validation - %% - Copyright (C) 2008 - 2024 IRD, Ultreia.io - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//Apache Struts//XWork Validator 1.0.3//EN" - "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> -<validators> - - <field name="code"> - <!-- code is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- code (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- code should be unique --> - <field-validator type="referentialUniqueField" short-circuit="true"> - <message/> - </field-validator> - </field> - - <field name="comment"> - <!-- comment (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- comment length <= 512 --> - <field-validator type="stringMaxLength"> - <param name="maxLength">512</param> - <message/> - </field-validator> - </field> - - <field name="homeId"> - <!-- homeId (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- homeId should be unique --> - <field-validator type="referentialUniqueField" short-circuit="true"> - <message/> - </field-validator> - </field> - - <field name="label1"> - <!-- label1 is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- label1 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label2"> - <!-- label2 is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- label2 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label3"> - <!-- label3 is a mandatory string --> - <field-validator type="mandatoryString" short-circuit="true"> - <message/> - </field-validator> - - <!-- label3 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label4"> - <!-- label4 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label5"> - <!-- label5 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label6"> - <!-- label6 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label7"> - <!-- label7 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="label8"> - <!-- label8 (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - </field> - - <field name="source"> - <!-- source (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- source length <= 512 --> - <field-validator type="stringMaxLength"> - <param name="maxLength">512</param> - <message/> - </field-validator> - </field> - - <field name="uri"> - <!-- uri (if not null) is not a blank string --> - <field-validator type="notBlankString"> - <message/> - </field-validator> - - <!-- uri should be unique --> - <field-validator type="referentialUniqueField" short-circuit="true"> - <message/> - </field-validator> - </field> - -</validators> ===================================== core/api/validation/src/main/resources/fr/ird/observe/dto/referential/common/HullMaterialDto-update-warning-validation.xml deleted ===================================== @@ -1,74 +0,0 @@ -<!-- - #%L - ObServe Core :: API :: Validation - %% - Copyright (C) 2008 - 2024 IRD, Ultreia.io - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//Apache Struts//XWork Validator 1.0.3//EN" - "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> -<validators> - - <field name="label1"> - <!-- label1 is not translated --> - <field-validator type="fieldexpression"> - <param name="expression"> - <![CDATA[ isLabelTranslated(label1, label2, label3) ]]> - </param> - <message>observe.referential.Referential.validation.label1.untranslated</message> - </field-validator> - </field> - - <field name="label2"> - <!-- label2 is not translated --> - <field-validator type="fieldexpression"> - <param name="expression"> - <![CDATA[ isLabelTranslated(label2, null, null) ]]> - </param> - <message>observe.referential.Referential.validation.label2.untranslated</message> - </field-validator> - </field> - - <field name="label3"> - <!-- label3 is not translated --> - <field-validator type="fieldexpression"> - <param name="expression"> - <![CDATA[ isLabelTranslated(label3, label1, label2) ]]> - </param> - <message>observe.referential.Referential.validation.label3.untranslated</message> - </field-validator> - </field> - - <field name="status"> - <!-- referential is enabled--> - <field-validator type="fieldexpression" short-circuit="true"> - <param name="expression"> - <![CDATA[ enabled ]]> - </param> - <message>observe.referential.Referential.validation.disabled</message> - </field-validator> - </field> - - <field name="uri"> - <!-- uri string should be filled --> - <field-validator type="stringNotFilled"> - <message/> - </field-validator> - </field> - -</validators> View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/92cb74da0866b4beeada949734... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/92cb74da0866b4beeada949734... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT (@tchemit)