diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2017-10-02 13:22:14 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2017-10-02 13:22:14 +0200 |
commit | 5c5286c9655434bd83a9d3699d10e88a5485cfed (patch) | |
tree | a180dec1c7385faff061afda8742b264881c7145 /lib | |
parent | c6a94277ed64511833005920a77e62b3029ab4bf (diff) | |
download | norsk-urskog-registrations-5c5286c9655434bd83a9d3699d10e88a5485cfed.tar.gz norsk-urskog-registrations-5c5286c9655434bd83a9d3699d10e88a5485cfed.tar.bz2 norsk-urskog-registrations-5c5286c9655434bd83a9d3699d10e88a5485cfed.zip |
Clear errors before validating again.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/band.rb | 2 |
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 |