Lack of data/input validation and is a critical challenge because it might cause failures in the software, and can also break the security upon web applications such as an unauthorized access to data. Traditional security solutions do not properly address this problem. For example, Firewalls and SSL are not adequate security for a web application. One the most common web application vulnerabilities that are known to date is SQL injection. In this paper, a new data validation service which is based upon semantic web technologies has been developed to prevent the security vulnerabilities at the application level and to secure the web system even if the input validation modules are bypassed. Our semanitc architecture consists of the following components: RDFa annotation for elements of web pages, interceptor, RDF extractor, RDF parser, and data validator. Principally, The prototype of the proposued service indicate that the proposed data validation service might provide a detection, and prevention of some web application attacks.