-2
I tried to locate this doubt in the forum and could not find. I have an Asp Net MVC application that uses the Entity Framework with Identity to login. My client registration works perfectly, but I’m not able to validate two fields: Username and Login. I tried to locate where they are called, but from what I read on the net so far, it gets "encapsulated" and I couldn’t put the validations on them. I’d like to put a validation like that on them:
[Required]
[StringLength(10, MinimumLength = 6)]
public string Senha { get; set; }
The problem is that I am not able to find Username and Login. I could not find the Accountviewmodels.Cs that I was referred to on the net. Can someone please help me? I would just like to validate the Username and Login fields so that it is not possible to save the registration with them blank, as I did not find their location, I can not validate and the easiest way I found was as I reported in the code above.
if you save it surely is passing the value to them in your action ... just give an F12 on top of the class.
– Marco Souza