SEM Labs

Handcrafted Pixels, Code & Title Tags

Extending Functionality

XFL

XFL elements can be extended to add new functionality by adding methods to the relevant class. Validation methods (collection, file, validate) should return true when the value validates and false when it doesn't. Data manipulation methods (format and sanitise) should return the modified value.

Example

By adding the above method to the validate class, you would be able to check if a field input is a valid US social security number using the following code: