Hello, from within the custom policy (server side) you can use transformations such as GetCurrentDateTime, DateTimeComparison to compare time passed between the later and the former and AssertBooleanClaimIsEqualToValue to validate the later output. You will need to find a way to determine how many leap years have passed to properly set the DateTimeComparison timeSpanInSeconds input param. Or you might just add a REST technical profile as a validation one that calls an API you develop that does the heavy lifting.
Client side you can use vanilla JS or jQuery to validate the the DOM element value created for the claim. The element will use the claim name as it's id. EG:
<input id="phoneNumber" />
Please let me know if you need more help. If the answer was helpful to you, please accept it and, optionally, provide feedback so that other members in the community can benefit from it.