angular.widget.@ng:required
Description
The ng:required
attribute widget validates that the user input is present. It is a special case
of the ng:validate
attribute widget.
Usage
In HTML Template Binding
<INPUT ng:required>
...
</INPUT>
Example
I cannot be blank: <input type="text" name="value" ng:required><br/>
it('should check ng:required', function(){
expect(element('.doc-example-live :input').attr('className')).toMatch(/ng-validation-error/);
input('value').enter('123');
expect(element('.doc-example-live :input').attr('className')).not().toMatch(/ng-validation-error/);
});