Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for is_in operator #86

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KaranTrueAccord
Copy link

Currently, this Rules Engine has the support to check if the value has the other string. There are use cases where a person may want to see if the value is part of the other string.

@@ -95,6 +95,10 @@ def matches_regex(self, regex):
def non_empty(self):
return bool(self.value)

@type_operator(FIELD_TEXT)
def contains_in(self, other_string):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just "is_in"? Contains_in isnt't really a thing people say.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, it really fits what we are trying to do

@KaranTrueAccord KaranTrueAccord changed the title Support for contains_in operator Support for is_in operator Oct 13, 2022
@@ -96,7 +96,7 @@ def non_empty(self):
return bool(self.value)

@type_operator(FIELD_TEXT)
def contains_in(self, other_string):
def is_in(self, other_string):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You really need a substring option? Or are you intending this to be about membership in a list of things?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

substring option

@vasinata
Copy link

@jfalkenstein Do you know who maintains this repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants