Java component for validation