org.broadleafcommerce.openadmin.server.service.persistence.validation
Class RegexPropertyValidator
java.lang.Object
org.broadleafcommerce.openadmin.server.service.persistence.validation.RegexPropertyValidator
- All Implemented Interfaces:
- PropertyValidator
public class RegexPropertyValidator
- extends Object
- implements PropertyValidator
Validates a field against a configured 'regularExpression' item
- Author:
- Phillip Verheyden
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegexPropertyValidator
public RegexPropertyValidator()
validate
public boolean validate(Entity entity,
Map<String,String> validationConfiguration,
Serializable instance,
String value)
- Description copied from interface:
PropertyValidator
- Validates a property for an entity
- Specified by:
validate in interface PropertyValidator
- Parameters:
entity - Entity DTO of the entity attempting to savevalidationConfiguration - the map represented by the set of ConfigurationItem for a
ValidationConfiguration on a propertyinstance - actual object representation of entity. This can be cast to entity interfaces (like Sku or
Product)value - the value attempted to be saved
- Returns:
- true if this passes validation, false otherwise.
Copyright © 2013. All Rights Reserved.