Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Validation with Dropkick #280

Closed
memorx opened this issue Mar 25, 2015 · 2 comments
Closed

Using Validation with Dropkick #280

memorx opened this issue Mar 25, 2015 · 2 comments

Comments

@memorx
Copy link

memorx commented Mar 25, 2015

Hi, I have been using dropkick for a while, and I am loving it. Lately we need to change the way our forms work, including validation, however, I don't find any documentation about how to do it properly.

For example this is my HTML

<div class="dropdown-new-order">
  @Html.LabelFor(x => x.OnsiteEnviroment)<span class="required-field">*</span>
  @Html.DropDownListFor(x => x.OnsiteEnviroment, Model.OnsiteEnviromentDictionary.Select(z => new SelectListItem { Value = z.Key.ToString(), Text = z.Value }), "Please select of the following", new { @class = "dropkick full-field", data_width = "280", tabindex = "2", required = "required" })
</div>

I am using the required attribute to validate the dropdown, however , it doesn't acknowledge the validation, and using another validation tool has the same effect.

Do you have any recommendation? I stackoverflow I found some solutions but they haven't worked for me:

http://stackoverflow.com/questions/13145359/how-to-use-jquery-validate-on-div-based-select-form-element?rq=1

Thank you

@Robdel12
Copy link
Owner

Hmm, so it seems you need to do some client side validations with DropKick?

@Robdel12
Copy link
Owner

Robdel12 commented Apr 7, 2015

Closing this. Will reopen when/if more info is available :)

@Robdel12 Robdel12 closed this as completed Apr 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants