# Data Validation

**URL:** <https://community.thunkable.com/t/data-validation/1102451>\
**Category:** Questions about Thunkable X\
**Created:** [February 17, 2021, 3:24am UTC](https://community.thunkable.com/t/data-validation/1102451 "2021-02-17T03:24:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbcguytb](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@tbcguytb](https://community.thunkable.com/u/tbcguytb)\
**Post date:** [February 17, 2021, 3:24am UTC](https://community.thunkable.com/t/data-validation/1102451/1 "2021-02-17T03:24:29Z")

</div>

Hello everyone, I’m new here. I love the platform. It has matured alot since I looked at it a long time ago… I am starting an app that has input fields on a screen for ordering. First field is “First Name”. The field cannot be blank as it is required. If the user enters none or 1 letter it throws and error to add more letters. I have this all working nicely, except how on earth do i get the focus back on the name field after the alert. I would think this is possible. Like my banking app the cursor stays in the field if nothing is in the pw field and I select Login. Great product, but this has to be possible or even have a block work around.

Dave

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [February 17, 2021, 4:47am UTC](https://community.thunkable.com/t/data-validation/1102451/2 "2021-02-17T04:47:19Z")

</div>

I tested the described scenario and don’t see the issue as the Text Input field gets the focus back after the alert has been dismissed on both iOS and Android.

But I think that using a message appearing under the text input in case the criteria are not met would be more user-friendly. Try taking advantage of this block by adding a check in it 😉

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/5/75f113f650d06147fe27ca1592a3aea6c74dc814.png)

---

<div class="post-metadata">

**Author:** ![tbcguytb](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@tbcguytb](https://community.thunkable.com/u/tbcguytb)\
**Post date:** [February 17, 2021, 12:36pm UTC](https://community.thunkable.com/t/data-validation/1102451/3 "2021-02-17T12:36:45Z")

</div>

Yes I had on UnFocus set instead of Changes, thanks. And i had already moved to the message under the field.

---

<div class="post-metadata">

**Author:** ![tbcguytb](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@tbcguytb](https://community.thunkable.com/u/tbcguytb)\
**Post date:** [February 17, 2021, 12:37pm UTC](https://community.thunkable.com/t/data-validation/1102451/4 "2021-02-17T12:37:10Z")

</div>

This brings me to another question about validation…is it better to validate on a field basis or on a form basis. So when the user clicks Submit, the form is validated in one block of code.

---

<div class="post-metadata">

**Author:** ![Deluxe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deluxe/32/30016_2.png) [@Deluxe](https://community.thunkable.com/u/Deluxe)\
**Post date:** [February 17, 2021, 1:01pm UTC](https://community.thunkable.com/t/data-validation/1102451/5 "2021-02-17T13:01:10Z")

</div>

I don’t think that the notion of “form” exists on Thunkable. It is just a set of fields. I would do it per field.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:29pm UTC](https://community.thunkable.com/t/data-validation/1102451/6 "2024-11-08T13:29:23Z")

</div>


