summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2017-10-02 13:22:14 +0200
committerHarald Eilertsen <haraldei@anduin.net>2017-10-02 13:22:14 +0200
commit5c5286c9655434bd83a9d3699d10e88a5485cfed (patch)
treea180dec1c7385faff061afda8742b264881c7145
parentc6a94277ed64511833005920a77e62b3029ab4bf (diff)
downloadnorsk-urskog-registrations-5c5286c9655434bd83a9d3699d10e88a5485cfed.tar.gz
norsk-urskog-registrations-5c5286c9655434bd83a9d3699d10e88a5485cfed.tar.bz2
norsk-urskog-registrations-5c5286c9655434bd83a9d3699d10e88a5485cfed.zip
Clear errors before validating again.
-rw-r--r--lib/band.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/band.rb b/lib/band.rb
index efccc5f..9b949c7 100644
--- a/lib/band.rb
+++ b/lib/band.rb
@@ -36,6 +36,8 @@ class Band
end
def validate!
+ @errors = []
+
if @name.nil? || @name.strip.empty?
errors << "Bandnavn mangler"
end