Net Question Answer site, specially started to allow visitors of this site ask their doubts and queries. Just click the Ask Now button and ask your question now.Hi guys, I'm trying to build a multiple choice question panel and would like to know how do I go about creating a validation script where a pop-up would appear, if the user chooses either a right or wrong answer?By default the scope of the validator is the same as the Vue instance that owns it, sometimes you may have multiple fields within the same component, they are in different forms and serve different purposes.The validator will then treat those two fields as the same field which will cause problems detecting the input and displaying the errors.This example uses event bus to communicate errors with the parent component, the parent component can also clear, or force validate the child component. There is a better approach introduced by using the Provide/Inject API.You might need to also use your Laravel/Express or whatever backend as your validation provider for numerous reasons, like checking if an email is unique since it is hard to implement on the client-side, we can acheive this using a custom rule and the The following demo shows how would it work in action, note that it will only trigger if the user entered a valid email since the validator early exits upon first failure.
like the radio buttons you only have attach the validator directive and attributes on the checkbox under validation if there are multiple checkboxes (group) you only have to add the directive on one of them.
This is the error that will appear to a user if the field does not validate.
Finally, click on the dropdown arrow to choose a script to invoke a validation rule.
Since there is no real DB in this example, Its being simulated by a dynamic array.
Now you can ask questions directly to me on my new site ASPForums.