mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 05:57:57 +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>
|
<label class="col-sm-2 control-label" for="inputName">{{ 'settings.group.edit.name' | translate }}</label>
|
||||||
<div class="col-sm-7">
|
<div class="col-sm-7">
|
||||||
<input name="name" type="text" id="inputName" required class="form-control"
|
<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"/>
|
ng-minlength="3" ng-maxlength="50" ng-attr-placeholder="{{ 'settings.group.edit.name' | translate }}" ng-model="group.name"/>
|
||||||
</div>
|
</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.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.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.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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -185,6 +185,7 @@ public class TestDocumentResource extends BaseJerseyTest {
|
|||||||
// Search documents
|
// Search documents
|
||||||
Assert.assertEquals(1, searchDocuments("full:uranium full:einstein", document1Token));
|
Assert.assertEquals(1, searchDocuments("full:uranium full:einstein", document1Token));
|
||||||
Assert.assertEquals(2, searchDocuments("tit*", document1Token));
|
Assert.assertEquals(2, searchDocuments("tit*", document1Token));
|
||||||
|
Assert.assertEquals(2, searchDocuments("docu*", document1Token));
|
||||||
Assert.assertEquals(2, searchDocuments("full:title", document1Token));
|
Assert.assertEquals(2, searchDocuments("full:title", document1Token));
|
||||||
Assert.assertEquals(2, searchDocuments("title", document1Token));
|
Assert.assertEquals(2, searchDocuments("title", document1Token));
|
||||||
Assert.assertEquals(1, searchDocuments("super description", document1Token));
|
Assert.assertEquals(1, searchDocuments("super description", document1Token));
|
||||||
|
Loading…
Reference in New Issue
Block a user