fixed bug in val-pattern directive; missing message declaration