@Override
    public ValidationResult validateProperty(String property, ViewInstanceDefinition definition, ValidationContext mode) {
        if (property.equals(PARAMETER_NAME_FREEFORM)) {
            // do nothing, this property can be free form
        } else if (property.equals(PARAMETER_NAME_URL)) {
            return  validateParameterURL(definition.getPropertyMap());
        } else if (property.equals(PARAMETER_NAME_INTEGER)) {
            return  validateParameterInteger(definition.getPropertyMap());
        } else if (property.equals(PARAMETER_NAME_FIRST_VALUE)) {
            return  validateParameterFirst(definition.getPropertyMap());
        } else if (property.equals(PARAMETER_NAME_SECOND_VALUE)) {
            return  validateParameterSecond(definition.getPropertyMap());
        }
        
        return ValidationResult.SUCCESS;
    }
The validator class for the PropertyValidator view.
ambari-views/examples/property-validator-view/src/main/java/org/apache/ambari/view/property/MyValidator.java