how to validate decimal number with percision of (25, 4) iin csharp

Code Example - how to validate decimal number with percision of (25, 4) iin csharp

                
                        Two Decimal Points
[RegularExpression(@"^\d+(\.\d{1,2})?%%%~COMPRESS~PRE~0~%%%quot;)]
This regular expression will make sure that the property has at most two decimal places.

Max 18 digits
[Range(0, 9999999999999999.99)]