# How to extract username & password entities from text?

**URL:** <https://forum.rasa.com/t/how-to-extract-username-password-entities-from-text/12803>\
**Category:** Rasa Open Source\
**Created:** [July 11, 2019, 10:36am UTC](https://forum.rasa.com/t/how-to-extract-username-password-entities-from-text/12803 "2019-07-11T10:36:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jabberlope](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/jabberlope/32/3201_2.png) [@jabberlope](https://forum.rasa.com/u/jabberlope)\
**Post date:** [July 11, 2019, 2:35pm UTC](https://forum.rasa.com/t/how-to-extract-username-password-entities-from-text/12803/2 "2019-07-11T14:35:05Z")

</div>

Hi @alihejazi, check out this reply to my similar request. You should use a form action and then extract those unique fields from the user’s last response.

> [@How best to fill a slot that can have any value](http://forum.rasa.com/t/how-best-to-fill-a-slot-that-can-have-any-value/11494/4):
>
> You can check out this post on how to use forms: [Building contextual assistants with Rasa Forms](https://blog.rasa.com/building-contextual-assistants-with-rasa-formaction/) Rather than using a custom action for just filling a product slot, you could use the validate\_[slot] method in forms to validate whenever the slot is filled. For the slot value to be set to whatever the user enters, you can use sth like this in the slot\_mapping function. def slot\_mappings(self) -\> Dict[Text, Union[Dict, List[Dict]]]: return { "loan\_amount": self.from\_text(intent=None), …

---

_[View the full topic](https://forum.rasa.com/t/how-to-extract-username-password-entities-from-text/12803)._
