allow element value validation with function
Merge pull request #3 from potapuff/master

Allow element value validation with function