Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

Commit

Permalink
Allow numeric SOA records to be blank, because the ir presence is alr…
Browse files Browse the repository at this point in the history
…eady handled by validates_presence_of; this way, we only get one error per field
  • Loading branch information
ripta committed Apr 16, 2009
1 parent 35f7b8f commit 47268fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/soa.rb
Expand Up @@ -11,9 +11,11 @@ class SOA < Record
validates_presence_of :primary_ns, :content, :name

validates_numericality_of :serial, :refresh, :retry, :expire,
:allow_blank => true,
:greater_than_or_equal_to => 0

validates_numericality_of :minimum, # RFC2308
:allow_blank => true,
:greater_than_or_equal_to => 0,
:less_than_or_equal_to => 10800

Expand Down

0 comments on commit 47268fa

Please sign in to comment.