diff --git a/project/main/templates/main/base/base.html b/project/main/templates/main/base/base.html
index 99fad34..690ea44 100644
--- a/project/main/templates/main/base/base.html
+++ b/project/main/templates/main/base/base.html
@@ -5,6 +5,7 @@
+
{{ title or "Django-html demo" }}
diff --git a/project/main/templates/main/components/toast.html b/project/main/templates/main/components/toast.html
new file mode 100644
index 0000000..eb508c3
--- /dev/null
+++ b/project/main/templates/main/components/toast.html
@@ -0,0 +1,9 @@
+{% macro toast(title, id) %}
+
+{% endmacro %}
diff --git a/project/main/templates/main/form_validation.html b/project/main/templates/main/form_validation.html
index f6d8c83..bb6082a 100644
--- a/project/main/templates/main/form_validation.html
+++ b/project/main/templates/main/form_validation.html
@@ -1,19 +1,34 @@
{% extends "main/base/layout.html" %}
+{% from "main/components/toast.html" import toast %}
{% block content %}
-
+
+
+ {{ toast(title="Form validated and saved successfully", id="toast-success") }}
+
+
+
{% endblock %}
diff --git a/project/main/templates/main/form_validation_content.html b/project/main/templates/main/form_validation_content.html
index f0cd0b0..15ed66a 100644
--- a/project/main/templates/main/form_validation_content.html
+++ b/project/main/templates/main/form_validation_content.html
@@ -57,3 +57,10 @@
{% endif %}
+
+
+{% if validation.is_valid %}
+
+{% endif %}
diff --git a/project/main/views/form_validation.py b/project/main/views/form_validation.py
index a462d72..8c0d119 100644
--- a/project/main/views/form_validation.py
+++ b/project/main/views/form_validation.py
@@ -11,6 +11,7 @@ from project.main.views.demo_view_base import DemoViewBase
@dataclass
class Validation:
validated: bool = False
+ is_valid: bool = False
name: Optional[str] = None
consent: Optional[bool] = None
@@ -57,6 +58,10 @@ class FormValidationView(DemoViewBase):
if not validation.consent:
validation.consent_error = "You should consent"
+ validation.is_valid = not (
+ validation.name_error or validation.age_error or validation.consent_error
+ )
+
return render(
context={
"validation": validation,