Browse Source

Small bugfix with field validator.

pull/143/head
Sebastian Stehle 8 years ago
parent
commit
d07e19d5aa
  1. 4
      src/Squidex.Infrastructure.MongoDb/MongoDb/BsonConverter.cs
  2. 2
      src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts

4
src/Squidex.Infrastructure.MongoDb/MongoDb/BsonConverter.cs

@ -20,7 +20,7 @@ namespace Squidex.Infrastructure.MongoDb
foreach (var property in source)
{
var key = property.Key == "$type" ? "&type" : property.Key;
var key = property.Key.Replace("$", "§");
result.Add(key, property.Value.ToBson());
}
@ -34,7 +34,7 @@ namespace Squidex.Infrastructure.MongoDb
foreach (var property in source)
{
var key = property.Name == "&type" ? "$type" : property.Name;
var key = property.Name.Replace("§", "$");
result.Add(key, property.Value.ToJson());
}

2
src/Squidex/app/features/schemas/pages/schema/schema-page.component.ts

@ -74,7 +74,7 @@ export class SchemaPageComponent extends AppComponentBase implements OnDestroy,
name: ['',
[
Validators.maxLength(40),
ValidatorsEx.pattern('[a-z0-9]+(\\-[a-zA-Z0-9]+)*', 'Name must be a valid javascript name in camel case.')
ValidatorsEx.pattern('[a-zA-Z0-9]+(\\-[a-zA-Z0-9]+)*', 'Name must be a valid javascript name in camel case.')
]],
isLocalizable: [false]
});

Loading…
Cancel
Save