miniShop | Simple e-commerce site for Turkcell Geleceği Yazanlar
kandi X-RAY | miniShop Summary
kandi X-RAY | miniShop Summary
miniShop
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of miniShop
miniShop Key Features
miniShop Examples and Code Snippets
Community Discussions
Trending Discussions on miniShop
QUESTION
My problem here is, that my select doesnt send me an error message if nothing is selected, because in this case "Ich bin...", is a disabled option. It doesnt let me complete the registration, which is great, but it doesnt throw an error message...
So now Im asking myself: How can I make my select throw error message when nothing (or in this case "Ich bin...") is selected ?
U can visit the page here: https://projekte.tgm.ac.at/3ahit/smeth/02BREC/Minishop/index.php?site=register
...ANSWER
Answered 2020-Apr-26 at 12:52Achieving what you ask within Materialize is pretty tricky, and requires a hack.
The reason being, select elements don't share the same validation properties as text inputs. (And as a side note - you should never rely solely on the Materialize validation - it is really only for UX/aesthetics). Materialize actually hides the native select and replaces it with a text input and dropdown.
The hack:
To make the select behave like a traditional text input, we can use jQuery to manipulate the dom and insert the validation helper field (taken from the text input documentation - remember text inputs support validation):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install miniShop
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page