code: private boolean checkValueConstraints(int requiredType, String[] constraints, Value value)
     {
        ValueConstraintsMatcher constrMatcher =
           new ValueConstraintsMatcher(constraints, locationFactory, dataManager, nodeTypeDataManager);
  
        try
        {
           return constrMatcher.match(((BaseValue)value).getInternalData(), requiredType);
        }
        catch (RepositoryException e1)
        {
           return false;
        }
     }
docs: Check value constrains.
  
  @param requiredType int
  @param constraints - string constrains.
  @param value - value to check.
  @return result of check.