Skip to content
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.

Select element will not validate #118

Closed
cougit opened this issue Sep 14, 2018 · 2 comments
Closed

Select element will not validate #118

cougit opened this issue Sep 14, 2018 · 2 comments

Comments

@cougit
Copy link

cougit commented Sep 14, 2018

Strange issue that none of the select elements in my wizard will validate using the "data-validation" tag. I have also tried manually validating the select element using the errorPopover method which does actually create the message, but the "top" and "left" potions of the class are set to 0px thus it appears in the upper left corner of my wizard. Snippet:

<div class="form-group">
<label for="organizationName">Organization</label>
<select class="form-control" id="organizationName" onchange="setOrganization();" data-validation="validateOrganizationName"></select>
<input type="hidden" id="selectedOrganizationId" />
</div>

js:
if (wizard.getActiveCard() === wizard.cards["card1"]) {
if ($('#organizationName').val() === null || $('#organizationName').val() === undefined || $('#organizationName').val() === '') {
wizard.errorPopover($('#organizationName'), "Please select an organization", true);
}
}

I know that the validation is run through before navigation, but since the "data-validation" did not stop it, I was attempting to insert something in the "incrementCard" function. Of course that might not be the best solution.

Any feed back would be appreciated.

Cheers

validation_issue

@cougit
Copy link
Author

cougit commented Sep 14, 2018

And wouldn't you believe I was not using the proper data tag... works fine when you use "data-validate" and not "data-validation". UGH!!!!

@cougit
Copy link
Author

cougit commented Sep 14, 2018

Forgot to close...

@cougit cougit closed this as completed Sep 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant