Factory validation in REST service;