# Handling Form errors and exceptions

**URL:** <https://forum.getkirby.com/t/handling-form-errors-and-exceptions/6748>\
**Category:** Questions\
**Tags:** v2\
**Created:** [February 25, 2017, 7:03am UTC](https://forum.getkirby.com/t/handling-form-errors-and-exceptions/6748 "2017-02-25T07:03:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![csmnng](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/csmnng/32/3443_2.png) [@csmnng](https://forum.getkirby.com/u/csmnng)\
**Post date:** [February 25, 2017, 7:03am UTC](https://forum.getkirby.com/t/handling-form-errors-and-exceptions/6748/1 "2017-02-25T07:03:35Z")

</div>

Hey guys,

I’m trying to work on the registration form errors. For example I’ve got an error in case the user hasn’t filled all the form fields. I’d also like to create an error if the username is taken. Right now, Kirby throws an exception. Is there a way to return to the homepage and displaying an alert which says that instead?

Would love some guiding to the right place if that’s possible 🙂 Thanks!

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [February 25, 2017, 7:22am UTC](https://forum.getkirby.com/t/handling-form-errors-and-exceptions/6748/2 "2017-02-25T07:22:14Z")

</div>

This post might be helpful: [A carefully written question about user-facing forms](https://forum.getkirby.com/t/a-carefully-written-question-about-user-facing-forms/4848/2)

Also this [gist](https://gist.github.com/bastianallgeier/c396df7923848912393d), while it’s all about sending emails, the idea is the same.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 4:52pm UTC](https://forum.getkirby.com/t/handling-form-errors-and-exceptions/6748/3 "2025-02-06T16:52:37Z")

</div>

Archived on February 6, 2025, 4:52pm UTC


