completed assignment

This commit is contained in:
2025-04-02 17:50:49 +05:30
parent 35e7485001
commit 72f2541f58
32 changed files with 531 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
trigger ValidNumber on Contact (before insert)
{
String phonePattern = '(123) 456-7890';
for (Contact contact : Trigger.New)
{
if (!Pattern.matches(phonePattern, contact.Phone))
{
contact.Phone.addError('Invalid phone format!');
}
}
}