The formal verification of safety properties for hybrid systems is an important but challenging problem. Recently, barrier functions have been introduced to prove safety without requiring the computation of the reachable set of continuous or hybrid dynamical systems. This paper presents a new approach for the construction of barrier functions for safety verification of nonlinear dynamical systems. The proposed method is based on the search for the parameters of a parametric barrier function using interval analysis. This technique allows considering complex dynamics without needing any relaxation of constraints in the barrier function.