# \`validate\_my\_slot()\` skipped on slot autofill in a form

**URL:** <https://forum.rasa.com/t/validate-my-slot-skipped-on-slot-autofill-in-a-form/63582>\
**Category:** Rasa Open Source\
**Created:** [September 26, 2024, 7:58am UTC](https://forum.rasa.com/t/validate-my-slot-skipped-on-slot-autofill-in-a-form/63582 "2024-09-26T07:58:24Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![deep](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/deep/32/24006_2.png) [@deep](https://forum.rasa.com/u/deep)\
**Post date:** [September 26, 2024, 7:58am UTC](https://forum.rasa.com/t/validate-my-slot-skipped-on-slot-autofill-in-a-form/63582/1 "2024-09-26T07:58:24Z")

</div>

My slots and form are as:

```auto
entities:
- email

slots:
  user_email:
    type: text
    influence_conversation: false
    mappings:
      - type: from_entity
        entity: email
        conditions:
          - active_loop: login_form
forms:
  login_form:
    required_slots:
      - user_email

```

And my validate\_form action:

```auto
class ValidateLoginForm(FormValidationAction):
    def name(self) -> Text:
        return "validate_login_form"

    async def validate_user_email(
            self,
            slot_value: Any,
            dispatcher: CollectingDispatcher,
            tracker: Tracker,
            domain: Dict
    ) -> Dict[Text, Any]:
        if tracker.get_slot(REQUESTED_SLOT) == USER_EMAIL:
            # email validation logic
            if valid_email:
                return {USER_EMAIL: slot_value}
            else:
                dispatcher.utter_message(response="utter_unregistered_email")
                return {USER_EMAIL: None}
        return {USER_EMAIL: tracker.get_slot(USER_EMAIL)}

```

And now while testing below are 2 cases: #Case1 (Proper functioning)

```auto
>> /login
Bot works fine and asks for email
>> put invalid email
Bot works fine and tells its invalid email & asks to put email again

```

#Case2 (Abnormally skipping validation)

```auto
>> /login{{"email":"invalid_email"}}
Bot doesnt run validate_user_email() and thus accepts invalid email as slot value
Bot continues the form

```

Why is `validate_user_email()` being skipped in the second case? Isnt it supoposed to run everytime that specific slot is being filled, irrespective of how it is filled?

---

_[View the full topic](https://forum.rasa.com/t/validate-my-slot-skipped-on-slot-autofill-in-a-form/63582)._
