# Forms and Validation `Unicorn` has two options for validation. It can either use the standard Django `forms` infrastructure for re-usability or `ValidationError` can be raised for simpler use-cases. ## Forms `Unicorn` can use the Django `forms` infrastructure for validation. This means that a form could be re-used between any other Django views and a `Unicorn` component. ```{note} There are many [built-in fields available for Django form fields](https://docs.djangoproject.com/en/stable/ref/forms/fields/#built-in-field-classes) which can be used to validate text inputs. ``` ```python # book_form.py from django_unicorn.components import UnicornView from django import forms class BookForm(forms.Form): title = forms.CharField(max_length=100, required=True) publish_date = forms.DateField(required=True) class BookView(UnicornView): form_class = BookForm title = "" publish_date = "" ``` ```html