mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-30 16:01:14 -04:00
fix(curriculum): clarify requirements for id property (#57335)
This commit is contained in:
@@ -7,7 +7,7 @@ dashedName: step-68
|
||||
|
||||
# --description--
|
||||
|
||||
Finally, it is time to call the `removeSpecialChars` on the `id`, `title`, and `description` properties in your `taskObj`.
|
||||
Call `removeSpecialChars` on the `title`, and `description` properties in your `taskObj`. For the `id` property, only call it on the `titleInput.value` part of the property value.
|
||||
|
||||
This will remove issues with broken task data.
|
||||
|
||||
@@ -15,22 +15,22 @@ With that you have completed the project.
|
||||
|
||||
# --hints--
|
||||
|
||||
You should call `removeSpecialChars` on `titleInput.value` when assigning the `id`.
|
||||
You should call `removeSpecialChars` on `titleInput.value` when assigning the `id`.
|
||||
|
||||
```js
|
||||
assert.match(code, /\s*id:\s*`\$\{removeSpecialChars\(titleInput\.value\)\.toLowerCase\(\s*\)\.split\(\s*('|")\s{1}\1\s*\)\.join\(\s*('|")-\2\s*\)\}-\$\{Date\.now\(\s*\)\}`\s*/)
|
||||
assert.match(code, /\s*id:\s*`\$\{removeSpecialChars\(titleInput\.value\)\.toLowerCase\(\s*\)\.split\(\s*('|")\s{1}\1\s*\)\.join\(\s*('|")-\2\s*\)\}-\$\{Date\.now\(\s*\)\}`\s*/);
|
||||
```
|
||||
|
||||
You should call `removeSpecialChars` on `titleInput.value` when assigning the `title`.
|
||||
You should call `removeSpecialChars` on `titleInput.value` when assigning the `title`.
|
||||
|
||||
```js
|
||||
assert.match(code, /\s*title:\s*removeSpecialChars\(titleInput\.value\)\s*/,)
|
||||
assert.match(code, /\s*title:\s*removeSpecialChars\(titleInput\.value\)\s*/);
|
||||
```
|
||||
|
||||
You should call `removeSpecialChars` on `descriptionInput.value` when assigning the `description`.
|
||||
You should call `removeSpecialChars` on `descriptionInput.value` when assigning the `description`.
|
||||
|
||||
```js
|
||||
assert.match(code, /\s*description:\s*removeSpecialChars\(descriptionInput\.value\)\s*/)
|
||||
assert.match(code, /\s*description:\s*removeSpecialChars\(descriptionInput\.value\)\s*/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user