Looking to create a form validation on email text field. Have previously used validation to ensure correct email is produced.
But here looking to create a more custom rule which allows only emails ending in the format .ac.uk
Here a user would be able to provide any university/college/instituion as long as the last 6 characters in the string = .ac.uk with the general format for the mail as follows: email@university.ac.uk
Solution preferably in PHP, currently looking at employing a rule using the end part in this statement:
^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$
Making this part *(\.[a-z]{2,3})
relate to the .ac.uk
many thanks, much appreciated Jeanclaude