ASP.NET CORE & Angular .NET 5.0 v10.0.0
Downloaded a brand new project . Using the Power tools created a new entity with two properties ( required) , Used the option Create Non-Modal CRUD page.
Generated and run the application however the validation of the required fields doesn't work.
The applicaiton shows a Saved Succesfully but doesn't show errors abour the fields been required. Also there is no Form tag in the html ( not sure if this was intentional or a bug)
14 Answer(s)
-
0
Hi @christianharo
Thanks, we will check this in a short time.
-
0
Created an issue about it. You can follow the progress in here: https://github.com/aspnetzero/aspnet-zero-core/issues/3636
-
0
Hi @christianharo I check it and it is by design. By default, if you do not enter a value to nonnullable property, the default value is set.
-
0
Well no value es set as the record does not get created. And the message says created succesfully.
-
0
Hi @christianharo
Could you share the entity json with us ? You can find it under "aspnet-core\AspNetZeroRadTool" of your project.
Thanks,
-
0
-
0
if you are refering to the entity i am working on ths will be the file:
{ "IsRegenerate": false, "MenuPosition": "main", "RelativeNamespace": "CcmMain", "EntityName": "Schedule", "EntityNamePlural": "Schedules", "TableName": "Schedules", "PrimaryKeyType": "int", "BaseClass": "Entity", "EntityHistory": false, "AutoMigration": true, "UpdateDatabase": true, "CreateUserInterface": true, "CreateViewOnly": true, "CreateExcelExport": false, "IsNonModalCRUDPage": true, "IsMasterDetailPage": false, "PagePermission": { "Host": true, "Tenant": true }, "Properties": [ { "Name": "ScheduleName", "Type": "string", "MaxLength": 150, "MinLength": 1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true } }, { "Name": "ScheduleType", "Type": "string", "MaxLength": 150, "MinLength": 1, "Range": { "IsRangeSet": false, "MinimumValue": 0.0, "MaximumValue": 0.0 }, "Required": true, "Nullable": false, "Regex": "", "UserInterface": { "AdvancedFilter": true, "List": true, "CreateOrUpdate": true } } ], "NavigationProperties": [], "NavigationPropertyOneToManyTables": [], "EnumDefinitions": [], "DbContext": null }
-
0
Hi @christianharo
Thanks, yes, this is the one I'm takling about. We will check it.
-
0
-
0
Thank you @musa.demir for the solution. Any idea when the new release of the tools will be in place ?
-
0
Hi @christianharo
It is planned for 2020-12-17.
-
0
-
0
Hi @christianharo,
Thanks, we will check this.
-
0
Hi @christianharo
Sory about that. It is fixed now, it will be included to next rad tool release. Until that, you can fix it manually:
this._xxProxy.createOrEdit(this.xxEntity) .pipe(finalize(() => {//add that pipe this.saving = false; })) .subscribe((x) => { this.saving = false; this.notify.info(this.l('SavedSuccessfully')); this._router.navigate(['/app/main/xxNamespace/xxEntity']); });