Test validation on custom field

Given that I have a custom field that extends the filament Field - how do I write tests to test the validation? Say for example, I have a date field with some methods like mustBeInPast and mustBeInFuture which are essentially shortcuts for the rules() method. The only way I can find to do this is to create a form component, add my custom field and then test it like a normal form. This does seem the long way about it though rather than just testing the field directly. Any ideas?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?