mirror of
https://github.com/sismics/docs.git
synced 2024-12-22 11:23:48 +01:00
Closes #267: spaces not allowed in group names
This commit is contained in:
parent
7a285d11a5
commit
b8c2bd3564
@ -9,6 +9,7 @@
|
||||
<label class="col-sm-2 control-label" for="inputName">{{ 'settings.group.edit.name' | translate }}</label>
|
||||
<div class="col-sm-7">
|
||||
<input name="name" type="text" id="inputName" required class="form-control"
|
||||
ui-validate="{ space: '!$value || $value.indexOf(\' \') == -1' }"
|
||||
ng-minlength="3" ng-maxlength="50" ng-attr-placeholder="{{ 'settings.group.edit.name' | translate }}" ng-model="group.name"/>
|
||||
</div>
|
||||
|
||||
@ -16,6 +17,7 @@
|
||||
<span class="help-block" ng-show="editGroupForm.name.$error.required && editGroupForm.$dirty">{{ 'validation.required' | translate }}</span>
|
||||
<span class="help-block" ng-show="editGroupForm.name.$error.minlength && editGroupForm.$dirty">{{ 'validation.too_short' | translate }}</span>
|
||||
<span class="help-block" ng-show="editGroupForm.name.$error.maxlength && editGroupForm.$dirty">{{ 'validation.too_long' | translate }}</span>
|
||||
<span class="help-block" ng-show="editGroupForm.name.$error.space && editGroupForm.$dirty">{{ 'validation.no_space' | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -185,6 +185,7 @@ public class TestDocumentResource extends BaseJerseyTest {
|
||||
// Search documents
|
||||
Assert.assertEquals(1, searchDocuments("full:uranium full:einstein", document1Token));
|
||||
Assert.assertEquals(2, searchDocuments("tit*", document1Token));
|
||||
Assert.assertEquals(2, searchDocuments("docu*", document1Token));
|
||||
Assert.assertEquals(2, searchDocuments("full:title", document1Token));
|
||||
Assert.assertEquals(2, searchDocuments("title", document1Token));
|
||||
Assert.assertEquals(1, searchDocuments("super description", document1Token));
|
||||
|
Loading…
Reference in New Issue
Block a user