Sure, Here it is
protected virtual void CheckErrors(IdentityResult identityResult)
{
identityResult.CheckErrors(LocalizationManager);
}
Hi ismcagdas,
Thankyou, i've checked the webconfig and found out that my custom error is off, i turned it on but the error message still not behave as I want it to.
Now it shows "Identity.DuplicateName" as an error message to user and not "Name {0} is already taken.", still struggling to make this works.
Thank you for your reply. I'm afraid that it's not the answer I seek, but the main problem is already resolved. I guest i just have to post a new one instead. Thanks
Thanks a lot, The code is working fine now. Of Course, I'll be gladly send you the Indonesian XML once it finished. I hope it could helps.
Also after reading the documentation, I still don't get how to use CheckErrors() method. how can I use this line as validation? <text name="Identity.DuplicateName" value="Name {0} is already taken." />
also here is my code public async Task<IdentityResult> CreateAsync(GuestCategory input) { IdentityResult _return = new IdentityResult(); try { if (_guestCategoryRepository.Count(i => i.Name == input.Name) == 0) { await _guestCategoryRepository.InsertAsync(input); _return = IdentityResult.Success; } else { _return = IdentityResult.Failed("Identity.DuplicateName"); } } catch (Exception ex) { _return = IdentityResult.Failed(ex.Message); } return _return; }
I think I'm using IdentityResult wrong here, pls help Thanks