Comments (3)
I fixed the bug you mentioned and it will be included in the upcoming release in the following days.
from kirby-dreamform.
The required
attribute is added to fields that must be filled out. However, browsers will ignore this attribute since the form has the novalidate
attribute set. The reason for using novalidate
is that the built-in browser validation is not easily customizable without JavaScript, and we have extensive custom server-side validation checks in place.
In my opinion, this can lead to a poor user experience as form would display two different types of error messages: one from the browser's native validation and another from the server-side validation.
The Email field serves as a good example to illustrate the differences between browser and server-side validation:
Validation Check | Browser | Server |
---|---|---|
Field is required | ✅ | ✅ |
Value is a valid email format | ✅ | ✅ |
Email domain actually exists | ❌ | ✅ |
Email domain is not a throwaway/spam email | ❌ | ✅ |
As you can see, the browser validation stops way early. This pattern is similar for all other form fields.
from kirby-dreamform.
Thanks for elaborating on the required-attribute, sounds very reasonable!
from kirby-dreamform.
Related Issues (16)
- postinstall command does not work with public folder directories HOT 1
- Undefined variable $append HOT 1
- Empty referer crashes page
- Implement custom error message when sender email is empty ("" is not a valid email address) HOT 1
- "Report as Spam" dialog doesn't have any text HOT 1
- Form snippet not working with Blade templating HOT 4
- Will there come an export function? HOT 1
- Form snippet doesn't work with Twig templates HOT 2
- Empty error-div is included already on load and if there is no error. HOT 2
- Whitespace in field label spans HOT 1
- Edge cases when using multiple forms on the same page HOT 5
- Always inject guards, even without button
- Email action does not work with file field in form
- Install command not working, ID is set randomly on a multi-site
- Redirect does not work on subpath installation (e.g. example.com/website/form) (infinite recursion)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kirby-dreamform.