Maintainer(s):
lx
Supported by: Community
Visit the support forum Download
NetefxValidator is a class for form validation, so it replaces the RequiredFields() validator.
Features:
In version 0.3 there is no javascript validation at all. So you can disable js-validation in your _config.php
When you build forms in silverstripe, you can use a RequiredFields-validator (official documentation). This validator defines which fields have to be filled in. But often this is not enough. If you want to make sure, that your form (frontend or backend) is filled correctly, your rules have to be more restrictive. There are specific fields in sapphire, like the EmailField() (official API documentation), which have a validationrule themeselves. But it doesnt make sense to define a separate class for every field of your form just for validation purposes.
You can use the NetefxValidator to perform any validation you want. You can write NetefxValidatorRules of several types and add them to the validator. Each rule belongs to a form field, has a type, parameters and an error message, which is displayed to the user, if the rule does not validate. There are different types of rules, like REQUIRED rules, which simply express, that a field has to be filled, numeric rules, which are used to compare an input field to a fixed value or to other input fields, REGEXP rules, which expect a regular expression to check for and FUNCTION rules, in which you can use your self-written functions or library functions. Finally you can combine rules to a new rule using logical rule combination.
Just move the folder "NetefxValidator" to your projectfolder.
http://www.netefx.de/Silverstripe-NetefxValidator.php
Version:
[Unreleased]
Date: 2011-11-20
Compatible with: SilverStripe 2.4.4, 2.4.5
Download:
NetefxValidator.zip
To get a preview of our next release, download the latest build of unstable git master branch here. Please
be careful: this is more likely to contain bugs, especially on modules undergoing a lot of development.
SHA hash: bcd27feed36ad3cd1e1031bb826d5319e98436c1
Build Date: 2013-02-03
Download:
Unstable Git access: https://github.com/lx-berlin/NetefxValidator
Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com
Comments on this website? Please give feedback.