Sunday, 25 August 2013

JQuery Validation Engine with knockout and bootstrap

JQuery Validation Engine with knockout and bootstrap

I am using bootstrap and knockout in my project . Before now i was using
knockout validation , but now i have to use jquery validation engine with
knockout view models and bootstrap html . Suppose this is my html
<fieldset>
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control
placeholder" id="personName" placeholder="Your
name" data-bind="value: name" />
</div>
<div class="form-group">
<label for="email">Email address</label>
<input type="email" class="form-control
placeholder" id="personEmail"
placeholder="Your email"
data-original-title="Your activation email
will be sent to this address."
data-bind="value: email, event: { change:
checkDuplicateEmail }" />
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" class="form-control
placeholder" id="password"
placeholder="Password" data-bind="value:
password" />
</div>
<div class="form-group">
<label for="confirmPassword">Repeat Password</label>
<input type="password" class="form-control
placeholder" id="repeatPassword"
placeholder="Repeat password"
data-bind="value: confirmPassword, event: {
change: matchPassword }" />
</div>
<div class="form-group">
<label for="companyName">Company Name</label>
<input type="text" class="form-control
placeholder" id="companyName"
placeholder="Your company name"
data-bind="value: company" />
</div>
<div class="form-group">
<label for="country">Country</label>
<select class="form-control placeholder"
id="country" data-bind="options:
availableCountries, value: selectedCountry,
optionsCaption: 'Country'">
</select>
</div>
<button id="signupuser" type="button"
data-bind="click: signup" class="btn btn-primary
btn-block">Create Free Account</button>
</fieldset>
now i am confused that how to use Jquery Validation Engine Plugin with my
above code .

No comments:

Post a Comment