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

validate user input in activation #6172

Merged
merged 5 commits into from
Jul 9, 2020

Conversation

Ghostvv
Copy link
Contributor

@Ghostvv Ghostvv commented Jul 9, 2020

Proposed changes:

  • make sure trigger inout get validated
  • clean up unused method

Status (please check what you already did):

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

@Ghostvv Ghostvv requested a review from wochinge July 9, 2020 10:37
@Ghostvv Ghostvv changed the base branch from rules to rules-one-validate-function July 9, 2020 11:30
rasa/core/actions/forms.py Show resolved Hide resolved
rasa/core/actions/forms.py Outdated Show resolved Hide resolved
@@ -43,6 +44,7 @@ async def is_activated(

# default implementation checks if form active
def _default_activation_events(self) -> List[Event]:
# TODO if this is in the loop action, probably it should not be `Form`
Copy link
Contributor

Choose a reason for hiding this comment

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

You mean we should rename the event?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, and also think whether we want to use the same event name for forms and loops. So we need to think through how they interact with each other. Let's tackle it separately. I added TODO so that we don't forget

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>
@Ghostvv Ghostvv merged commit 655afab into rules-one-validate-function Jul 9, 2020
@Ghostvv Ghostvv deleted the rules-form-activation branch July 9, 2020 12:00
wochinge added a commit that referenced this pull request Jul 9, 2020
* have one validate function for the whole form

* remove unused function

* more tests

* remove unnecessary ignores

* add clarification comment

* validate user input in activation (#6172)

* validate user input in activation

Co-authored-by: Tobias Wochinger <t.wochinger@rasa.com>

* more tests for entity extraction

* more `FormAction` tests

* add todo

Co-authored-by: Vladimir Vlasov <vladimir@rasa.com>
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.

2 participants