0
thuc.nghiem@techplus.vn created
- ABP Framework version: v7.0.1
- UI Type: Angular
- Database System: EF Core ( Oracle.)
- Tiered (for MVC) or Auth Server Separated (for Angular): no
- Exception message and full stack trace:
- Steps to reproduce the issue:
ObjectExtensionManager.Instance.Modules().ConfigureIdentity(identity =>
{
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty<string>(UserConsts.LoanOfficer,
options =>
{
options.Attributes.Add(new RequiredAttribute());
options.Attributes.Add(new StringLengthAttribute(UserConsts.MaxLoanOfficerLength));
//options.UI.OnEditForm.IsVisible = false;
});
user.Validators.Add(context =>
{
//help check exist??
});
});
});
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
2 Answer(s)
-
0
Hello thuc.nghiem@techplus.vn,
As you are using
RequiredAttributeforLoanOfficer, If you have not passing value forLoanOfficerfrom UI then it will through error/Exception.If you want to implement custom validation you can refer this https://docs.abp.io/en/abp/latest/Object-Extensions#custom-validation
Regards, Anjali
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hello Anjali. My problem is to check if it already exists and prevent it from being saved to the database. Can you provide a solution for me?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)