Updates how the validation works in the member model mapper to use the native validation stuff instead of custom pre-values.

This commit is contained in:
Shannon
2014-11-18 14:32:51 +11:00
parent ce80c9a244
commit 1accc6275a
4 changed files with 10 additions and 8 deletions

View File

@@ -1,11 +1,11 @@
<div>
<input type="email" name="textbox"
ng-model="model.value"
id="{{model.alias}}"
class="umb-editor umb-textstring textstring"
ng-required="model.config.IsRequired"
val-server="value" />
ng-model="model.value"
id="{{model.alias}}"
class="umb-editor umb-textstring textstring"
ng-required="model.config.IsRequired || model.validation.mandatory"
val-server="value" />
<span class="help-inline" val-msg-for="textbox" val-toggle-msg="required">Required</span>
<span class="help-inline" val-msg-for="textbox" val-toggle-msg="email">Invalid email</span>

View File

@@ -2,7 +2,7 @@
<input type="text" name="textbox" ng-model="model.value" id="{{model.alias}}"
class="umb-editor umb-textstring textstring"
val-server="value"
ng-required="model.config.IsRequired || model.validation.mandatory"
ng-required="model.validation.mandatory"
ng-trim="false" />
<span class="help-inline" val-msg-for="textbox" val-toggle-msg="required">Required</span>