| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php /** MicroUrlValidator */ |
||
| 45 | public function client(IFormModel $model) |
||
| 46 | { |
||
| 47 | $javaScript = 'if (/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(this.value'. |
||
| 48 | ') != true) { e.preventDefault(); this.focus(); alert(\'Value is not a URL\'); }'; |
||
| 49 | |||
| 50 | return $javaScript; |
||
| 51 | } |
||
| 52 | } |
||
| 53 |