This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<div class="row"> | |
<div class="col-md-12"> | |
<div class="box"> | |
<!-- /.box-header --> | |
<div class="box-body"> | |
<form action="/" id="my-form"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyComponent extends React.Component { | |
state = { | |
redirect: false | |
} | |
handleSubmit () { | |
axios.get(url) | |
.then(() => this.setState({ redirect: true })); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{"id":1, "check": "<input type='checkbox' name='selected_elements[]' value='0'>", "name":"Skinte","starts":"01/10/2016","description":"Etiam vel augue. Vestibulum rutrum rutrum neque. Aenean auctor gravida sem.\n\nPraesent id massa id nisl venenatis lacinia. Aenean sit amet justo. Morbi ut odio.\n\nCras mi pede, malesuada in, imperdiet et, commodo vulputate, justo. In blandit ultrices enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit."}, | |
{"id":2, "check": "<input type='checkbox' name='selected_elements[]' value='0'>","name":"Kamba","starts":"15/12/2016","description":"Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.\n\nDuis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.\n\nMauris enim leo, rhoncus sed, vestibulum sit amet, cursus id, turpis. Integer aliquet, massa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"hosting": { | |
"public": "dist" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::post('login', function() { | |
$validator = \Validator::make(request()->all(), [ | |
'email' => 'required', | |
'password' => 'required' | |
]); | |
if ($validator->fails()) { | |
//mostrar errores, o en json o lo que necesites | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::post('login', function() { | |
$validator = \Validator::make(request()->all(), [ | |
'email' => 'required', | |
'password' => 'required' | |
]); | |
if ($validator->fails()) { | |
//mostrar errores, o en json o lo que necesites | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mat-spinner *ngIf="appService.loading$ | async"></mat-spinner> | |
<router-outlet *ngIf="(appService.loading$ | async) == false"></router-outlet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import {Observable} from "rxjs/Observable"; | |
@Injectable() | |
export class AppService { | |
loading$: Observable<boolean> = Observable.of(false); | |
constructor() { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
phone: ['', Validators.compose( | |
[ | |
Validators.required, | |
Validators.pattern(/^[679]{1}[0-9]{8}$/) | |
] | |
)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.loginForm = this.fb.group({ | |
email: ['', Validators.compose([Validators.required, Validators.email]) ], | |
password: ['', Validators.compose([Validators.required, Validators.minLength(6)]) ], | |
phone: ['', Validators.compose( | |
[ | |
Validators.required, | |
phoneValidator(/^[679]{1}[0-9]{8}$/), | |
] | |
)] | |
}); |