Topic: Custom Validate input
Daniel Braun priority asked 7 years ago
<div class="md-form">
<i class="fa fa-envelope prefix"></i>
<input type="email" id="form9" class="form-control validate">
<label for="form9" data-error="wrong" data-success="right">Type your email</label>
</div>
thanks
xzesstence pro answered 5 years ago
its so typical for mdb that important stuff is unanswered.. this is so annyoing and people are paying for this...
you don't even have this with good open source...
both thumbs down @ mdb... as so often... i don't have so many thumbs to vote down this ....ing ..it!
Marta Wierzbicka staff commented 5 years ago
Hi,
would you explain where is exactly the problem? The most helpful would be if you create a snippet showing the problem here: https://mdbootstrap.com/snippets/. Someone from our staff will help you, but please, specify your problem.
Best, Marta
Rafał Rogulski free answered 7 years ago
data-error
and data-success
with a message content, all showing is doing in CSS. When you add to input class valid
then a success message is shown, when invalid
then error.
Remove validate
class from input to turn off default validation.
Regards
jerrytunin pro answered 7 years ago
paolo.guerra free answered 7 years ago
<input type="text" onfocusout="myFunction()">
I hope this is what you need.
Regards.
Daniel Braun priority answered 7 years ago
Function validateInput() {
If (text is wrong) {
display(data-error);
}
}
I want to write my own validator like validating the length.
I know if it's a error it triggers data-error message but what I would like to know how does it trigger it?
Thanks
Kamil Paciepnik free answered 7 years ago
<div class="md-form">
<i class="fa fa-envelope prefix"></i>
<input type="email" id="form9" class="form-control validate">
<label for="form9" data-error="Your Text" data-success="right">Type your email</label>
</div>
If this is not what you need. Please describe the problem better and I will help you.
Regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- Premium support: Yes
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No