Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tenant modals validation #6035

Merged
merged 3 commits into from Nov 3, 2020
Merged

Tenant modals validation #6035

merged 3 commits into from Nov 3, 2020

Conversation

stsrki
Copy link
Contributor

@stsrki stsrki commented Nov 3, 2020

resolve #6026

  • Blazorise validation for create, edit and connection string modals
  • Fixed display name localization for tenant model
  • modal can be submitted with enter key
  • Fixed user edit modal

@stsrki stsrki requested review from hikalkan and cotur November 3, 2020 11:26
await AppService.DeleteDefaultConnectionStringAsync(TenantInfo.Id);
await CheckPolicyAsync(ManageConnectionStringsPolicyName);

if (TenantInfo.UseSharedDatabase || TenantInfo.DefaultConnectionString.IsNullOrWhiteSpace())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You define as [Required] for TenantInfoModel.DefaultConnectionString, but here we control is that null or empty.

@@ -93,6 +100,7 @@ public class TenantInfoModel

public bool UseSharedDatabase { get; set; }

[Required]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be nullable. Does not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's only run if the checkbox is ticked so I think it's best to be Required in this case

@cotur cotur merged commit 27baa9b into dev Nov 3, 2020
@cotur cotur deleted the dev-tenant-validation branch November 3, 2020 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blazor UI: Implement validation for the tenant-management module
3 participants