A stochastic approach is proposed to generate a direct search procedure where errors in the constraints are inherently treated. The objective is to have the possibility of directly considering the relative accuracy in the satisfaction of constraints, when one is numerically solving a nonlinear constrained optimization problem. This is done by adding to the numerical algorithm the feature of modelling as random variables the errors with which the constraints are supposed to be approximated. Use is made of linear estimation theory, reducing the search increment determination to a problem of parameter estimation with a priori information. This problem is solved with the Gauss-Markov estimator in the Kalman form. The first order, direct search method, shows that results can be viewed as a stochastic version of the projection of the gradient method. An analysis is made showing the relationships between the proposed stochastic version and the existing deterministic method.