Changing Form validation to look better for open and close tags, Also improved message since the error could be not only due a missing tag but not wel formatted tags

This commit is contained in:
Jhonnatan Gonzalez
2016-12-21 23:12:41 -06:00
parent 9d179abd5a
commit fd2f173946

View File

@ -2411,7 +2411,7 @@
"tests": [
"assert($(\"form\") && $(\"form\").children(\"input\") && $(\"form\").children(\"input\").length > 0, 'message: Nest your text input element within a <code>form</code> element.');",
"assert($(\"form\").attr(\"action\") === \"/submit-cat-photo\", 'message: Make sure your <code>form</code> has an <code>action</code> attribute which is set to <code>/submit-cat-photo</code>');",
"assert(code.match(/<\\/form>/g) && code.match(/<form/g) && code.match(/<\\/form>/g).length === code.match(/<form/g).length, 'message: Make sure your <code>form</code> element has a closing tag.');"
"assert(code.match(/<\\/form>/g) && code.match(/<form [^<]*>/g) && code.match(/<\\/form>/g).length === code.match(/<form [^<]*>/g).length, 'message: Make sure your <code>form</code> element has well-formed open and close tags.');"
],
"type": "waypoint",
"challengeType": 0,