Regex Validation
Use regular expressions to validate text field input directly in the browser. Invalid input is rejected before the customer can submit.How to Add Regex Validation
- Edit your custom field in the Dashboard
- Enter a regex pattern in the Regex field
- Save your changes
Regex validation happens client-side, providing instant feedback to customers.
Common Patterns
Regex Tips
Custom Validation URL
For complex validation that can’t be expressed as regex—like checking if a player ID exists in your database—use a custom validation endpoint.How It Works
- Customer enters a value
- Fungies sends a POST request to your validation URL
- Your API checks if the value is valid
- Return
200 OKfor valid, any other status for invalid
Request Format
Fungies sends a POST request with the field value:Response
Example Endpoint
Securing Your Validation Endpoint
Fungies signs validation requests the same way as webhooks. The signature is in thex-fngs-signature header:
Verify the Signature
Use your validation URL secret (set in the Dashboard) to verify requests:Combining Validation Methods
You can use both regex and URL validation on the same field:- Regex runs first - Catches format errors instantly (client-side)
- URL validation runs second - Checks business logic (server-side)
Next Steps
Custom Fields Setup
Create and configure custom fields
Webhook Setup
Receive custom field data in your application