ASP.NET MVC password validation with hash -


so want add custom hash password, got stuck because own validation

my model:

public class ms_user {     [required(errormessage = "please input login email")]     [datatype(datatype.emailaddress)]     public object user_id { get; set; }      [required(errormessage = "please input password")]     // validation @ least 1 uppercase & 1 number, password lenght must greater 6 , lower 12, no special character     [regularexpression(@"^(?=.*\d)(?=.*[a-z])[a-za-z0-9](.{6,12})$", errormessage = "error, wrong password format")]      public object password { get; set; } } 

sample:

password inputed : admin123 // pass validation

hashedpassword output: l92vi3c2af7oftgy7jqyjkr8isyxef8pioqvmzjrn6rnrct6w6uudzv0yrcoudppxnc69gj2j4igxzwh1wrz9c19abn4uwksqx8d0txa+0ivxjavzoksaewpqm56gy/l:9kzqeh3nb9apjy81v/fvfu // after hashed password,

my project pass password validation, on db.savechanges(); return error, because password validation

is there solution?? prefer not add javascript validation...

thx

change datatype of password column nvarchar(max) in user table accomodate hashed password.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -