mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-01-11 11:48:40 +00:00
Allow to ommit form action/method
This commit is contained in:
parent
c98ec7517d
commit
c9d0550d4c
|
|
@ -102,8 +102,8 @@ git diff --cached --name-only | while read FILE; do
|
|||
fi
|
||||
|
||||
if [[ $TPL_SYNTAX = 4 ]]; then
|
||||
echo -e "\e[1;31m\tFound missing form element action, method or id.\e[0m" >&2
|
||||
grep -P '(\<form)((?!.*?(action|method|id)=).)*(>)' "$FILE" >&2
|
||||
echo -e "\e[1;31m\tFound missing form element name or id.\e[0m" >&2
|
||||
grep -P '(\<form)((?!.*?(name|id)=).)*(>)' "$FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ hasInvalidHtmlTemplateContent() {
|
|||
fi
|
||||
|
||||
# Form must have a id, action and method *error*
|
||||
if [[ -n $(grep -P '(\<form)((?!.*?(action|method|id)=).)*(>)' "$1") ]]; then
|
||||
if [[ -n $(grep -P '(\<form)((?!.*?(name|id)=).)*(>)' "$1") ]]; then
|
||||
return 4
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -104,8 +104,8 @@ git diff --name-only $TRAVIS_COMMIT_RANGE | while read FILE; do
|
|||
fi
|
||||
|
||||
if [[ $TPL_SYNTAX = 4 ]]; then
|
||||
echo -e "\e[1;31m\tFound missing form element action, method or id.\e[0m" >&2
|
||||
grep -P '(\<form)((?!.*?(action|method|id)=).)*(>)' "$FILE" >&2
|
||||
echo -e "\e[1;31m\tFound missing form element name or id.\e[0m" >&2
|
||||
grep -P '(\<form)((?!.*?(name|id)=).)*(>)' "$FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user