# Create a Custom Error Message

**URL:** <https://community.glideapps.com/t/create-a-custom-error-message/6106>\
**Category:** Ask for Help\
**Created:** [March 29, 2020, 9:55pm UTC](https://community.glideapps.com/t/create-a-custom-error-message/6106 "2020-03-29T21:55:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![PC83](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pc83/32/4901_2.png) [@PC83](https://community.glideapps.com/u/PC83)\
**Post date:** [March 29, 2020, 9:55pm UTC](https://community.glideapps.com/t/create-a-custom-error-message/6106/1 "2020-03-29T21:55:35Z")

</div>

Hi there,

I’m new to Glide and am just playing around with some functionality.

In a form in Glide, I ask the user their age (X) followed by asking them their planned retirement age (Y).

I need to do one of two things:  
(I) Prevent the user from entering a value (Y) which is less than (X)

or

(II) Alert the user with a custom error message to let them know that they must enter a value (Y) which is higher than (X)

Is there an elegant way of doing this? The if-then-else functionality seems to be limited to comparing values to absolutes, rather than to each other.

Thanks!

---

<div class="post-metadata">

**Author:** ![George\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/george_b/32/534_2.png) [@George\_B](https://community.glideapps.com/u/George_B)\
**Post date:** [March 29, 2020, 11:36pm UTC](https://community.glideapps.com/t/create-a-custom-error-message/6106/2 "2020-03-29T23:36:43Z")

</div>

At the current time what you are trying to accomplish in Form entry is not possible.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 30, 2020, 10:51am UTC](https://community.glideapps.com/t/create-a-custom-error-message/6106/3 "2020-03-30T10:51:38Z")

</div>

You would need to use a variety of components that are configured to be visible only if your number values are valid. I did something similar in my experiments app:

[experiments.glideapp.io](http://experiments.glideapp.io)

In the first tab (Age/Name Filter) try putting a value for max that’s lower than the min. You should get a message.

What this doesn’t do, unfortunately, is prevent the user from submitting a form (if this were a form and not just displaying data).

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 30, 2020, 12:27pm UTC](https://community.glideapps.com/t/create-a-custom-error-message/6106/4 "2020-03-30T12:27:12Z")

</div>

@Robert_Petitto’s ideas might work if you make the user enter ages first, and if the data is valid (simple math between the ages to calculate a value that’s above or below zero), then show a form button. Then use the column values to pull in the entered ages from the previous screen.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 30, 2020, 12:29pm UTC](https://community.glideapps.com/t/create-a-custom-error-message/6106/5 "2020-03-30T12:29:50Z")

</div>

@Jeff_Hager…would this be a form button within a form button?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [March 30, 2020, 12:47pm UTC](https://community.glideapps.com/t/create-a-custom-error-message/6106/6 "2020-03-30T12:47:11Z")

</div>

No I’m thinking like your example where the entry fields are on a detail view screen. Instead of your list showing it showing a message, it would show a button. Right now you can’t do the calculation in a form because the data needs to be written to the sheet first for the glide math column to work.

---

<div class="post-metadata">

**Author:** ![PC83](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pc83/32/4901_2.png) [@PC83](https://community.glideapps.com/u/PC83)\
**Post date:** [March 31, 2020, 11:32am UTC](https://community.glideapps.com/t/create-a-custom-error-message/6106/7 "2020-03-31T11:32:59Z")

</div>

Thanks for your answers, guys.

I feel like having some basic data validation capability would be a decent feature request for Glide.
