Skip to content

Commit d36b0c3

Browse files
authored
Merge pull request #243 from ritaf-ORM/patch-8
Rita's edits to ch 13
2 parents ca3fcd4 + 60c801e commit d36b0c3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

chapter_13_database_layer_validation.asciidoc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[[chapter_13_database_layer_validation]]
22
== Validation at the Database Layer
33

4+
// RITA: Update the warning since you have reviewed the chapter text in detail?
45
.🚧 Warning, Chapter update in progress
56
*******************************************************************************
67
This chapter is currently in the process of being rewritten for the 3e.
@@ -256,6 +257,7 @@ been passed an error variable, and if so, we do this:
256257
<1> We add the `.is-invalid` class to an form inputs with validation errors
257258
<2> We use a `div.invalid-feedback` to display any error messages from the server.
258259

260+
// RITA: Perhaps put the Bootstrap docs note and the footnote text into a tip box?
259261
((("Bootstrap", "documentation")))
260262
((("form control classes (Bootstrap)")))
261263
Take a look at the https://getbootstrap.com/docs/5.3/forms/validation/#server-side[Bootstrap docs] for more
@@ -360,7 +362,7 @@ blank.']}
360362

361363
So we try our first approach: using a `try/except` to detect errors. Obeying
362364
the Testing Goat, we start with just the `try/except` and nothing else. The
363-
tests should tell us what to code next...
365+
tests should tell us what to code next.
364366

365367
[role="sourcecode"]
366368
.src/lists/views.py (ch11l025)
@@ -974,7 +976,7 @@ NOTE: One of the reasons that the "three strikes and refactor" rule exists is th
974976
if you wait until you have three use cases, each might be slightly different,
975977
and it gives you a better view for what the common functionality is.
976978
If you refactor too early,
977-
you may find that the third use case doesn't quite fit with your refactored code...
979+
you may find that the third use case doesn't quite fit with your refactored code.
978980
((("database testing", "three strikes and refactor rule")))
979981
((("Test-Driven Development (TDD)", "concepts", "three strikes and refactor")))
980982
((("three strikes and refactor rule")))
@@ -1068,14 +1070,14 @@ OK
10681070
$ pass:quotes[*python src/manage.py test functional_tests*]
10691071
OK
10701072
----
1071-
1073+
// RITA: Perhaps add a few words after "Excellent" to explain what you're doing?
10721074
Excellent:
10731075

10741076
[subs="specialcharacters,quotes"]
10751077
----
10761078
$ *git commit -am "Refactor hard-coded URLs out of templates"*
10771079
----
1078-
1080+
// RITA: Please add a sentence to give the figure context. "Let's remove the item from our scratchpad."
10791081
[role="scratchpad"]
10801082
*****
10811083
* 'Remove hardcoded URLs from views.py'
@@ -1208,7 +1210,7 @@ $ pass:quotes[*python src/manage.py test functional_tests*]
12081210
OK
12091211
----
12101212

1211-
Cross off our to-dos...
1213+
Time to cross off our to-dos...
12121214

12131215
[role="scratchpad"]
12141216
*****
@@ -1218,7 +1220,7 @@ Cross off our to-dos...
12181220
* 'Remove duplication of validation logic in views'
12191221
*****
12201222

1221-
And a commit...
1223+
And commit...
12221224

12231225
[subs="specialcharacters,quotes"]
12241226
----
@@ -1231,7 +1233,7 @@ and we've taken the opportunity to do a few refactors along the way.
12311233
((("", startref="MLVhard13")))((("", startref="url13")))
12321234

12331235

1234-
That final scratchpad item will be the subject of the next chapter...
1236+
That final scratchpad item will be the subject of the next chapter.
12351237

12361238
.On Database-Layer Validation
12371239
*******************************************************************************

0 commit comments

Comments
 (0)