I am trying to get a very simple angular validation form using the angular material framework. I am building this form in a Sharepoint 2010 content editor webpart which dosent allow the use of . Im working on rebuilding the form instead on a webpage but not getting into other more complex issues.
But I dive into other issues im just wondering if a angular validation form can work without the element? Or if theres other directives that could replace it?
Heres a small example of what im aiming for but without the form element.
http://jsfiddle.net/jhadesdev/yfLqfzLw/2/?utm_source=website&utm_medium=embed&utm_campaign=yfLqfzLw
<div class="container" id="demoApp">
<form class="pure-form pure-form-aligned" name="frm" method="post"
novalidate autocomplete="off">
<fieldset>
<div class="pure-control-group">
<label>Username</label>
<input name="username" ng-model="user.username" type="text" placeholder="Username" required>
<div class="field-message" ng-messages="frm.username.$error" ng-if='frm.username.$dirty' ng-cloak>
<div ng-message="required">Username is required</div>
</div>
</div>
<div class="pure-control-group">
<label>Password</label>
<input name="password"
ng-model="user.password"
type="password"
placeholder="Password"
required
ng-minlength="6"
ng-maxlength="10">
<div class="field-message" ng-messages="frm.password.$error" ng-if='frm.password.$dirty' ng-cloak>
<div ng-message="required">Password is required</div>
<div ng-message="minlength">Password must have minimum 6 characters</div>
<div ng-message="maxlength">Password must have maximum 10 characters</div>
</div>
</div>
<div class="pure-control-group">
<label>Email Address</label>
<input name="email"
ng-model="user.email"
type="email"
placeholder="Email Address"
required>
<div class="field-message" ng-messages="frm.email.$error" ng-if='frm.email.$dirty' ng-cloak>
<div ng-message="required">Email is required</div>
<div ng-message="email">Must be a valid email</div>
</div>
</div>
<div class="pure-controls">
<label class="pure-checkbox">
<input name="conditions" ng-model="conditions" type="checkbox">
I've read the terms and conditions
</label>
<button type="submit" class="pure-button pure-button-primary"
ng-disabled="frm.$invalid || !conditions">Submit</button>
</div>
</fieldset>
</form>
</div>
Anyone have any information on this? Having no luck finding documentation on this.