diff --git a/chapter5/section3/app.py b/chapter5/section3/app.py index c69868b..a169e7c 100644 --- a/chapter5/section3/app.py +++ b/chapter5/section3/app.py @@ -16,7 +16,7 @@ def signin(): password = request.form['password'] error = None if len(username) < 5: - error = 'Password must be at least 5 characters' + error = 'Username must be at least 5 characters' if len(password) < 6: error = 'Password must be at least 8 characters' elif not any(c.isupper() for c in password): diff --git a/errata.md b/errata.md index c23fcb3..80074de 100644 --- a/errata.md +++ b/errata.md @@ -7,6 +7,7 @@ | --------------------- |:-------------:| --------------:|-----------:| | 第2章 autoenv(P24) 中间 | echo "source source /home/ubuntu..."| echo "source /home/ubuntu..."| @刘一鹤 | | 第3章 配置管理(P31) 尾部| app.config.from_envar('SETTINGS') | app.config.from_envar('YOURAPPLICATION_SETTINGS')| @凝霜 | +| 第5章 使用Ajax 尾部| error = 'Password must be at least 5 ...'| error = 'Username must be at least 5 ...'| @特特特~ | ### 代码错误