Are you checking the "Enabled" box on the left? If so, I cannot reproduce the behavior you see. Even when I don't check the box, it doesn't give an error but does not add the line (since I didn't enable, I suppose).
I recommend to not use "test" as a DNS search/suffix domain bc that one is reserved:
$ cat /etc/pihole/dnsmasq.conf
[..]
# RFC 6761: Caching DNS servers SHOULD recognize
# test, & invalid
# names as special and SHOULD NOT attempt to look up NS records for them, or
# otherwise query authoritative DNS servers in an attempt to resolve these
# names.
server=/test/
server=/invalid/
Configure any of below ones:
lan
intranet
internal
private
corp
home
home.arpa
Of which the last one is the most secure one and intended for private use:
EDIT: Oh below my revServers for my 10.0.0.0/24 network plus DHCP server at 10.0.0.2:
$ xargs -n1 whois <<< 'lan. intranet. internal. private. corp. home. home.arpa.'
No whois server is known for this kind of object.
No whois server is known for this kind of object.
No whois server is known for this kind of object.
No whois server is known for this kind of object.
No whois server is known for this kind of object.
No whois server is known for this kind of object.
[..]
domain: HOME.ARPA
[..]
contact: technical
name: Internet Assigned Numbers Authority (IANA)
organisation: Internet Corporation for Assigned Names and Numbers (ICANN)
[..]
remarks: This domain is administered as part of the .ARPA zone
remarks: management, described at https://iana.org/domains/arpa
Appendix G. Private DNS Namespaces
The special treatment of names ending in ".local." has been
implemented in Macintosh computers since the days of Mac OS 9, and
continues today in Mac OS X and iOS. There are also implementations
for Microsoft Windows [B4W], Linux, and other platforms.
Some network operators setting up private internal networks
("intranets") have used unregistered top-level domains, and some may
have used the ".local" top-level domain. Using ".local" as a private
top-level domain conflicts with Multicast DNS and may cause problems
for users. Clients can be configured to send both Multicast and
Unicast DNS queries in parallel for these names, and this does allow
names to be looked up both ways, but this results in additional
network traffic and additional delays in name resolution, as well as
potentially creating user confusion when it is not clear whether any
given result was received via link-local multicast from a peer on the
same link, or from the configured unicast name server. Because of
this, we recommend against using ".local" as a private Unicast DNS
top-level domain. We do not recommend use of unregistered top-level
domains at all, but should network operators decide to do this, the
following top-level domains have been used on private internal
networks without the problems caused by trying to reuse ".local." for
this purpose:
.intranet.
.internal.
.private.
.corp.
.home.
.lan.
I think there is a small bug in the error checking on that page.
If your first attempt is invalid, you will receive an error message. Then (without reloading the page), you try using the correct value, but the function sends both versions, causing the same error message. Reloading the page fix the issue.