fix validation's bugs in admin panel