r2012 - in trunk/nuiton-validator/src/test: java/org/nuiton/validator java/org/nuiton/validator/model java/org/nuiton/validator/xwork2 resources resources/org/nuiton/validator resources/org/nuiton/validator/model
Author: tchemit Date: 2011-01-17 19:01:10 +0100 (Mon, 17 Jan 2011) New Revision: 2012 Url: http://nuiton.org/repositories/revision/nuiton-utils/2012 Log: add test for new validation api Added: trunk/nuiton-validator/src/test/java/org/nuiton/validator/NuitonValidatorFactoryTest.java trunk/nuiton-validator/src/test/java/org/nuiton/validator/ValidatorTestHelper.java trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/ trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Person.java trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Pet.java trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Race.java trunk/nuiton-validator/src/test/java/org/nuiton/validator/xwork2/ trunk/nuiton-validator/src/test/java/org/nuiton/validator/xwork2/XWork2NuitonValidatorProviderTest.java trunk/nuiton-validator/src/test/java/org/nuiton/validator/xwork2/XWork2NuitonValidatorTest.java trunk/nuiton-validator/src/test/resources/org/nuiton/validator/model/ trunk/nuiton-validator/src/test/resources/org/nuiton/validator/model/Person-error-validation.xml trunk/nuiton-validator/src/test/resources/org/nuiton/validator/model/Person-warning-validation.xml Modified: trunk/nuiton-validator/src/test/resources/validators.xml Added: trunk/nuiton-validator/src/test/java/org/nuiton/validator/NuitonValidatorFactoryTest.java =================================================================== --- trunk/nuiton-validator/src/test/java/org/nuiton/validator/NuitonValidatorFactoryTest.java (rev 0) +++ trunk/nuiton-validator/src/test/java/org/nuiton/validator/NuitonValidatorFactoryTest.java 2011-01-17 18:01:10 UTC (rev 2012) @@ -0,0 +1,60 @@ +/* + * #%L + * Nuiton Utils :: Nuiton Validator + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ +package org.nuiton.validator; + +import org.junit.Assert; +import org.junit.Test; +import org.nuiton.validator.model.Person; +import org.nuiton.validator.xwork2.XWork2NuitonValidatorProvider; + +import java.util.Map; + +/** + * To test {@link NuitonValidatorFactory}. + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public class NuitonValidatorFactoryTest { + + @Test + public void testGetProviders() throws Exception { + Map<String, NuitonValidatorProvider> providers = NuitonValidatorFactory.getProviders(); + Assert.assertNotNull(providers); + Assert.assertEquals(1, providers.size()); + Assert.assertTrue(providers.containsKey(XWork2NuitonValidatorProvider.PROVIDER_NAME)); + Assert.assertTrue(providers.get(XWork2NuitonValidatorProvider.PROVIDER_NAME) instanceof XWork2NuitonValidatorProvider); + } + + @Test + public void testNewValidator() throws Exception { + + NuitonValidator<Person> validator = + NuitonValidatorFactory.newValidator(Person.class); + + ValidatorTestHelper.testPerson(validator); + } + +} Property changes on: trunk/nuiton-validator/src/test/java/org/nuiton/validator/NuitonValidatorFactoryTest.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-validator/src/test/java/org/nuiton/validator/ValidatorTestHelper.java =================================================================== --- trunk/nuiton-validator/src/test/java/org/nuiton/validator/ValidatorTestHelper.java (rev 0) +++ trunk/nuiton-validator/src/test/java/org/nuiton/validator/ValidatorTestHelper.java 2011-01-17 18:01:10 UTC (rev 2012) @@ -0,0 +1,108 @@ +/* + * #%L + * Nuiton Utils :: Nuiton Validator + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ +package org.nuiton.validator; + +import org.junit.Assert; +import org.nuiton.validator.model.Person; +import org.nuiton.validator.model.Pet; + +import java.util.List; + +/** + * Helper methods to test the validator api. + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public class ValidatorTestHelper { + public static void testPerson(NuitonValidator<Person> validator) { + Assert.assertNotNull(validator); + + Person person = new Person(); + + NuitonValidatorResult result; + + result = validator.validate(person); + + // two errors : no name, no firstname + // one warning : no pet + assertFieldMessages(result, NuitonValidatorScope.ERROR, Person.PROPERTY_FIRSTNAME, "person.firstname.required"); + assertFieldMessages(result, NuitonValidatorScope.ERROR, Person.PROPERTY_NAME, "person.name.required"); + assertFieldMessages(result, NuitonValidatorScope.WARNING, Person.PROPERTY_PET, "person.with.no.pet"); + + person.setFirstname("Joe"); + result = validator.validate(person); + + // one error : no name + // one warning : no pet + assertFieldMessages(result, NuitonValidatorScope.ERROR, Person.PROPERTY_FIRSTNAME); + assertFieldMessages(result, NuitonValidatorScope.ERROR, Person.PROPERTY_NAME, "person.name.required"); + assertFieldMessages(result, NuitonValidatorScope.WARNING, Person.PROPERTY_PET, "person.with.no.pet"); + + person.setName("Black"); + result = validator.validate(person); + + // no error + // one warning : no pet + assertFieldMessages(result, NuitonValidatorScope.ERROR, Person.PROPERTY_FIRSTNAME); + assertFieldMessages(result, NuitonValidatorScope.ERROR, Person.PROPERTY_NAME); + assertFieldMessages(result, NuitonValidatorScope.WARNING, Person.PROPERTY_PET, "person.with.no.pet"); + + person.addPet(new Pet()); + result = validator.validate(person); + + // no error + // no warning + assertFieldMessages(result, NuitonValidatorScope.ERROR, Person.PROPERTY_FIRSTNAME); + assertFieldMessages(result, NuitonValidatorScope.ERROR, Person.PROPERTY_NAME); + assertFieldMessages(result, NuitonValidatorScope.WARNING, Person.PROPERTY_PET); + + } + + public static void assertFieldMessages(NuitonValidatorResult result, + NuitonValidatorScope scope, + String field, + String... expectedMessages) { + + if (expectedMessages.length == 0) { + + // no messages + boolean hasMessages = result.hasMessagesForScope(field, scope); + Assert.assertFalse(hasMessages); + } else { + + // with messages + boolean hasMessages = result.hasMessagesForScope(field, scope); + Assert.assertTrue(hasMessages); + + List<String> messages = result.getMessagesForScope(field, scope); + Assert.assertNotNull(hasMessages); + Assert.assertEquals(expectedMessages.length, messages.size()); + for (String expectedMessage : expectedMessages) { + Assert.assertTrue(messages.contains(expectedMessage)); + } + } + } +} Property changes on: trunk/nuiton-validator/src/test/java/org/nuiton/validator/ValidatorTestHelper.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Person.java =================================================================== --- trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Person.java (rev 0) +++ trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Person.java 2011-01-17 18:01:10 UTC (rev 2012) @@ -0,0 +1,94 @@ +/* + * #%L + * Nuiton Utils :: Nuiton Validator + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ +package org.nuiton.validator.model; + +import org.apache.commons.lang.builder.ToStringBuilder; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public class Person { + + public static final String PROPERTY_NAME = "name"; + + public static final String PROPERTY_FIRSTNAME = "firstname"; + + public static final String PROPERTY_PET = "pet"; + + protected String name; + + protected String firstname; + + protected Collection<Pet> pet; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public Collection<Pet> getPet() { + return pet; + } + + public void setPet(Collection<Pet> pet) { + this.pet = pet; + } + + public void addPet(Pet pet) { + if (this.pet == null) { + this.pet = new ArrayList<Pet>(); + } + + pet.setPerson(this); + + this.pet.add(pet); + } + + @Override + public String toString() { + String result = new ToStringBuilder(this). + append(PROPERTY_NAME, name). + append(PROPERTY_FIRSTNAME, firstname). + toString(); + return result; + } +} Property changes on: trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Person.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Pet.java =================================================================== --- trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Pet.java (rev 0) +++ trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Pet.java 2011-01-17 18:01:10 UTC (rev 2012) @@ -0,0 +1,99 @@ +/* + * #%L + * Nuiton Utils :: Nuiton Validator + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ +package org.nuiton.validator.model; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public class Pet { + + public static final String PROPERTY_NAME = "name"; + + public static final String PROPERTY_TYPE = "type"; + + public static final String PROPERTY_PERSON = "person"; + + public static final String PROPERTY_RACE = "race"; + + protected String name; + + protected String type; + + protected Person person; + + protected Race race; + + + public void setName(String name) { + + this.name = name; + } + + public String getName() { + return name; + } + + public void setType(String type) { + this.type = type; + } + + + public String getType() { + return type; + } + + public void setPerson(Person person) { + this.person = person; + } + + + public Person getPerson() { + return person; + } + + public void setRace(Race race) { + this.race = race; + } + + public Race getRace() { + return race; + } + + @Override + public String toString() { + String result = new ToStringBuilder(this). + append(PROPERTY_NAME, this.name). + append(PROPERTY_TYPE, this.type). + append(PROPERTY_RACE, this.race). + toString(); + return result; + } + +} Property changes on: trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Pet.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Race.java =================================================================== --- trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Race.java (rev 0) +++ trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Race.java 2011-01-17 18:01:10 UTC (rev 2012) @@ -0,0 +1,56 @@ +/* + * #%L + * Nuiton Utils :: Nuiton Validator + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ +package org.nuiton.validator.model; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public class Race { + + public static final String PROPERTY_NAME = "name"; + + protected String name; + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + @Override + public String toString() { + String result = new ToStringBuilder(this). + append(PROPERTY_NAME, this.name). + toString(); + return result; + } +} Property changes on: trunk/nuiton-validator/src/test/java/org/nuiton/validator/model/Race.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-validator/src/test/java/org/nuiton/validator/xwork2/XWork2NuitonValidatorProviderTest.java =================================================================== --- trunk/nuiton-validator/src/test/java/org/nuiton/validator/xwork2/XWork2NuitonValidatorProviderTest.java (rev 0) +++ trunk/nuiton-validator/src/test/java/org/nuiton/validator/xwork2/XWork2NuitonValidatorProviderTest.java 2011-01-17 18:01:10 UTC (rev 2012) @@ -0,0 +1,83 @@ +/* + * #%L + * Nuiton Utils :: Nuiton Validator + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ +package org.nuiton.validator.xwork2; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.nuiton.validator.NuitonValidator; +import org.nuiton.validator.NuitonValidatorModel; +import org.nuiton.validator.NuitonValidatorScope; +import org.nuiton.validator.model.Person; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * To test {@link XWork2NuitonValidatorProvider}. + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public class XWork2NuitonValidatorProviderTest { + + protected XWork2NuitonValidatorProvider provider; + + @Before + public void setUp() { + provider = new XWork2NuitonValidatorProvider(); + } + + @Test + public void testGetModel() throws Exception { + + NuitonValidatorModel<Person> model = + provider.getModel(Person.class, null); + + Assert.assertNotNull(model); + Assert.assertNull(model.getContext()); + Assert.assertEquals(Person.class, model.getType()); + Set<NuitonValidatorScope> scopes = new HashSet<NuitonValidatorScope>( + Arrays.asList(NuitonValidatorScope.values())); + Assert.assertEquals(scopes, model.getScopes()); + } + + @Test + public void testNewValidator() throws Exception { + + + NuitonValidatorModel<Person> model = + provider.getModel(Person.class, null); + + NuitonValidator<Person> validator = provider.newValidator(model); + + Assert.assertNotNull(validator); + Assert.assertNotNull(validator.getModel()); + Assert.assertEquals(model, validator.getModel()); + + } + +} Property changes on: trunk/nuiton-validator/src/test/java/org/nuiton/validator/xwork2/XWork2NuitonValidatorProviderTest.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-validator/src/test/java/org/nuiton/validator/xwork2/XWork2NuitonValidatorTest.java =================================================================== --- trunk/nuiton-validator/src/test/java/org/nuiton/validator/xwork2/XWork2NuitonValidatorTest.java (rev 0) +++ trunk/nuiton-validator/src/test/java/org/nuiton/validator/xwork2/XWork2NuitonValidatorTest.java 2011-01-17 18:01:10 UTC (rev 2012) @@ -0,0 +1,62 @@ +/* + * #%L + * Nuiton Utils :: Nuiton Validator + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ +package org.nuiton.validator.xwork2; + +import org.junit.Assert; +import org.junit.Test; +import org.nuiton.validator.NuitonValidator; +import org.nuiton.validator.NuitonValidatorModel; +import org.nuiton.validator.ValidatorTestHelper; +import org.nuiton.validator.model.Person; + +/** + * To test {@link XWork2NuitonValidator}. + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public class XWork2NuitonValidatorTest { + + @Test + public void testNewValidator() throws Exception { + + XWork2NuitonValidatorProvider provider = + new XWork2NuitonValidatorProvider(); + + + NuitonValidatorModel<Person> model = + provider.getModel(Person.class, null); + + NuitonValidator<Person> validator = provider.newValidator(model); + + Assert.assertNotNull(validator); + Assert.assertNotNull(validator.getModel()); + Assert.assertEquals(model, validator.getModel()); + + ValidatorTestHelper.testPerson(validator); + + } + +} Property changes on: trunk/nuiton-validator/src/test/java/org/nuiton/validator/xwork2/XWork2NuitonValidatorTest.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-validator/src/test/resources/org/nuiton/validator/model/Person-error-validation.xml =================================================================== --- trunk/nuiton-validator/src/test/resources/org/nuiton/validator/model/Person-error-validation.xml (rev 0) +++ trunk/nuiton-validator/src/test/resources/org/nuiton/validator/model/Person-error-validation.xml 2011-01-17 18:01:10 UTC (rev 2012) @@ -0,0 +1,42 @@ +<!-- + #%L + Nuiton Utils :: Nuiton Validator + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser 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 Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> +<!DOCTYPE validators PUBLIC + "-//OpenSymphony Group//XWork Validator 1.0.2//EN" + "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> +<validators> + + <field name="name"> + <field-validator type="requiredstring"> + <message>person.name.required</message> + </field-validator> + </field> + + <field name="firstname"> + <field-validator type="requiredstring"> + <message>person.firstname.required</message> + </field-validator> + </field> + +</validators> \ No newline at end of file Property changes on: trunk/nuiton-validator/src/test/resources/org/nuiton/validator/model/Person-error-validation.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-validator/src/test/resources/org/nuiton/validator/model/Person-warning-validation.xml =================================================================== --- trunk/nuiton-validator/src/test/resources/org/nuiton/validator/model/Person-warning-validation.xml (rev 0) +++ trunk/nuiton-validator/src/test/resources/org/nuiton/validator/model/Person-warning-validation.xml 2011-01-17 18:01:10 UTC (rev 2012) @@ -0,0 +1,38 @@ +<!-- + #%L + Nuiton Utils :: Nuiton Validator + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser 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 Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> +<!DOCTYPE validators PUBLIC + "-//OpenSymphony Group//XWork Validator 1.0.2//EN" + "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> +<validators> + + <field name="pet"> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ pet!=null || !pet.empty]]></param> + <message>person.with.no.pet</message> + </field-validator> + </field> + +</validators> \ No newline at end of file Property changes on: trunk/nuiton-validator/src/test/resources/org/nuiton/validator/model/Person-warning-validation.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: trunk/nuiton-validator/src/test/resources/validators.xml =================================================================== --- trunk/nuiton-validator/src/test/resources/validators.xml 2011-01-17 18:00:50 UTC (rev 2011) +++ trunk/nuiton-validator/src/test/resources/validators.xml 2011-01-17 18:01:10 UTC (rev 2012) @@ -48,7 +48,7 @@ <validator name="conditionalvisitor" class="com.opensymphony.xwork2.validator.validators.ConditionalVisitorFieldValidator"/> - <!-- jaxx validators --> + <!-- default nuiton-validator validators --> <validator name="collectionFieldExpression" class="org.nuiton.validator.field.CollectionFieldExpressionValidator"/> <validator name="collectionUniqueKey" class="org.nuiton.validator.field.CollectionUniqueKeyValidator"/> <validator name="requiredFile" class="org.nuiton.validator.field.RequiredFileFieldValidator"/>
participants (1)
-
tchemit@users.nuiton.org