mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-01-22 08:38: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
|
||||
|
||||
# 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
|
||||
grep -P '(\<input)((?!.*?type=).)*(>)' $FILE >&2
|
||||
grep -P '(<input)((?!.*?type=).)*(>)' $FILE >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 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
|
||||
grep -P '(\<input|select|textarea)((?!.*?name=).)*(>)' $FILE >&2
|
||||
grep -P '(<input|<select|<textarea)((?!.*?name=).)*(>)' $FILE >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user