mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-02-12 17:18:40 +00:00
Fix form element bug
This commit is contained in:
parent
9f46c18967
commit
8409b5026f
|
|
@ -51,16 +51,16 @@ if [[ "$FILE" =~ ^.+(tpl\.php|html)$ ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Input elements must have a type= attribute *error*
|
# Input elements must have a type= attribute *error*
|
||||||
if [[ -n $(grep -P '(\<input)((?!.*?type=).)*(>)' $FILE) ]]; then
|
if [[ -n $(grep -P '(<input)((?!.*?type=).)*(>)' $FILE) ]]; then
|
||||||
echo -e "\e[1;31m\tFound missing input type attribute.\e[0m" >&2
|
echo -e "\e[1;31m\tFound missing input type attribute.\e[0m" >&2
|
||||||
grep -P '(\<input)((?!.*?type=).)*(>)' $FILE >&2
|
grep -P '(<input)((?!.*?type=).)*(>)' $FILE >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Form fields must have a name *error*
|
# Form fields must have a name *error*
|
||||||
if [[ -n $(grep -P '(\<input|select|textarea)((?!.*?name=).)*(>)' $FILE) ]]; then
|
if [[ -n $(grep -P '(<input|<select|<textarea)((?!.*?name=).)*(>)' $FILE) ]]; then
|
||||||
echo -e "\e[1;31m\tFound missing form element name.\e[0m" >&2
|
echo -e "\e[1;31m\tFound missing form element name.\e[0m" >&2
|
||||||
grep -P '(\<input|select|textarea)((?!.*?name=).)*(>)' $FILE >&2
|
grep -P '(<input|<select|<textarea)((?!.*?name=).)*(>)' $FILE >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user